bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

can we remove a directory from within that directory??


From: kuldeep vyas
Subject: can we remove a directory from within that directory??
Date: Mon, 21 Nov 2005 03:42:15 -0800 (PST)

       [input]    [input]    [input]    [input]                             
Hi,

I'm using Redhat 9 (kernel 2.4.20-8 on i686)
I logged in as k(username), then I started terminal, &
then I gave following commands:-

k>pwd
/home/k

k>mkdir my_dir
  // i created a directory: my_dir

k>cd my_dir
  // let's go in my_dir

  
  // now let's try to remove my_dir
k>rmdir /home/k/my_dir
  // no error;

k>ls /home/k/
  // my_dir gone 

k>pwd
/home/k/my_dir
  // oops!!

  // let's create my_file here!!
k>cat >my_file
bash: my_file: no such file or directory
  // I'm not allowed to a create file here.


pwd says I'm in my_dir, but my_dir doesn't exist.
I think: user should not be allowed to remove a directory,
until & unless he is placed in a directory which is 
hierarchically above the one he has chosen to remove.

If my approach is not right, I'd like to know the 
philosophy behind this.

Happy contributing to LINUX!!

kuldeep vyas
  

                
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]