Solved

How to remove a file named ".."

Posted on 2000-05-09
6
254 Views
Last Modified: 2010-04-20
There is a directory named ".." (created with a perl script)

System does not allow to use rm -r -f /home/www/...

How can I delete it?
0
Comment
Question by:Bigi
6 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2794621
. is a link to the parent directory, it should not be removed
0
 
LVL 1

Expert Comment

by:friebele
ID: 2794769
Actually, in any directory there are two files which are links to directories. "." is a link to the current, ".." is a link to the parent directory. Typing "cd .." makes you change to the parent directory. It is not possible to remove these.
0
 
LVL 3

Expert Comment

by:paulnic
ID: 2794875
have you tried a Perl script?  ;-)
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 40

Expert Comment

by:jlevie
ID: 2796032
As pointed out, "." & ".." are supposed to be in each directory and you can't remove them without damaging the directory structure. Furthermore the filesystem typically won't allow you to delete or to create nodes with those names. However, it is possible to create something that looks remarkably similar, say " .." or ".. ". The spaces that are a part of the name may not be obvious from ls (a control character in a file name can do the same thing), but are obvious  if you look at the directory with emacs/xemacs in dired mode or from a readdir() call. If the node name includes leading or trailing white space it can be removed by quoting the name, i.e., rmdir ".. ".
0
 
LVL 84

Accepted Solution

by:
ozo earned 100 total points
ID: 2797098
(I did say ".." above, but E-E removes "." when it's the first character in a comment)
0
 
LVL 1

Expert Comment

by:anwar12
ID: 2797687
".",".." are directories which are blanks and when u get in you also got nothing.
just like in ms-dos prompt when u type "dir" in one of your directory it also got that 2 directories.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adding more CPU cores to a Linux VM 5 146
How code a 301 redirect for folder files -> 1 file 2 58
how to install java on RHEL image on EC2 4 39
open source backup solution 1 36
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question