LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   remove folder from command line (https://www.linuxquestions.org/questions/linux-general-1/remove-folder-from-command-line-146341/)

demmylls 02-15-2004 09:34 AM

remove folder from command line
 
how to remove a folder from command line?
i could use rm command coz it said it cant remove a folder and only can remove files.

what is the command to completely remove (shift+del) a folder ?

rberry88 02-15-2004 09:50 AM

I take it you are talking about a directory, if so then type this in:

Code:

rm -r directoryname
or
rm -rf directoryname

You will have to be root, most likely.

rberry88

slackie1000 02-15-2004 09:51 AM

i think you mean something like...
.
rm -r $foldername
.
in some distros you will find a rmdir script..
it means that
.
rmdir $foldername
.
will work also...


regards

slackie

edit : i typed to slow!!! : )

Andrew Benton 02-15-2004 09:52 AM

rm -rf /path/to/the/folder #will delete folder
be very carefull!
rm -rf / path/to/the/folder #will delete every file on your system! See the space between /and path? The shell sees that command as
rm -rf /
because of that space.


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