Solved

How to remove a file named ".."

Posted on 2000-05-09
6
252 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now