Solved

How to remove a file named ".."

Posted on 2000-05-09
6
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ftp to port 21 4 70
error while installing php56 in redhat enterprise linux 20 77
php56-php-mcrypt for rhel7 php56 1 111
AWS Linux EC2 question on group 7 24
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…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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