Solved

How to remove a file named ".."

Posted on 2000-05-09
6
251 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
Comment Utility
. is a link to the parent directory, it should not be removed
0
 
LVL 1

Expert Comment

by:friebele
Comment Utility
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
Comment Utility
have you tried a Perl script?  ;-)
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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
Comment Utility
(I did say ".." above, but E-E removes "." when it's the first character in a comment)
0
 
LVL 1

Expert Comment

by:anwar12
Comment Utility
".",".." 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

15 Experts available now in Live!

Get 1:1 Help Now