LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Cmd to rm dir thats has files and other dirs (https://www.linuxquestions.org/questions/linux-general-1/cmd-to-rm-dir-thats-has-files-and-other-dirs-18780/)

psyklops 04-17-2002 07:06 PM

Cmd to rm dir thats has files and other dirs
 
Whats the command to force the removal of a directory that has files and other dirs inside of it. I hate having to go through piece by piece....

acid_kewpie 04-17-2002 07:15 PM

try "man rm" or even "rm --help"

psyklops 04-17-2002 07:55 PM

OPTIONS
Remove (unlink) the FILE(s).

-d, --directory
unlink directory, even if non-empty (super-user only)

-f, --force
ignore nonexistent files, never prompt



Ive tried both of thes and get

rm: cannot unlink `john-1.6': Is a directory

trickykid 04-17-2002 08:00 PM

try rm -rf name-of-dir that should remove the directory and force it... i think you can also do a rmdir.. man for options

psyklops 04-17-2002 08:12 PM

Thanks. It the option -r that did it for me. I checked the man page and it says that this option removes everything recursively. I dont really understand how this would work unless it would start at the bottom of the directory and work its way up removing the files within a dir, leaving it empty, to be removed from with the dir it was subsiding in... I dont even know if that makes sense.


All times are GMT -5. The time now is 11:13 AM.