Link to home
Start Free TrialLog in
Avatar of solunatec
solunatec

asked on

looking for command to remove directory and all below it:

looking a man for rm and rmdir and everytime I try to delete the directory with all below it it wont let me...? any way to do this.?
error message is Diretory not empty
i have also tried it with other shells ;..ie bash
ASKER CERTIFIED SOLUTION
Avatar of Maciej S
Maciej S
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You may check what files are in this directory with "ls -a directory" command. Probably there are some 'hidden' files (hidden = with names starting with '.').
Avatar of Tintin
Tintin

I'm surprised you managed to miss the following from the rm man page

     -R    Attempt to remove the file hierarchy rooted in each file argument.
           The -R option implies the -d option.  If the -i option is speci-
           fied, the user is prompted for confirmation before each directory's
           contents are processed (as well as before the attempt is made to
           remove the directory).  If the user does not respond affirmatively,
           the file hierarchy rooted in that directory is skipped.

     -r    Equivalent to -R.

first, is this a mount directory? is it a separate file system? you may run command below to see file systems and their mount directories.

what command you ran to delete dir? did you try

rm -rf dir

Are you root or owner of this  dir?
Avatar of solunatec

ASKER

sorry tintin I did not see your entry either before i gave the points out: i owe you 250
That's fine I don't need the points.  Did you find the man page description confusing?
solunatec: you can always click 'Request Attention' and ask moderators for changing your answer choice. I'm not going to object :)