Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-15-2004, 10:34 AM   #1
Registered: Aug 2003
Location: AT
Distribution: Fedora Core 3
Posts: 404

Rep: Reputation: 30
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 ?
Old 02-15-2004, 10:50 AM   #2
Registered: Aug 2003
Location: Arlington Heights, IL USA
Distribution: Fedora Core 1 & WinXP Pro & Gentoo 1.4 & Arch Linux
Posts: 558

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

rm -r directoryname
rm -rf directoryname
You will have to be root, most likely.

1 members found this post helpful.
Old 02-15-2004, 10:51 AM   #3
Senior Member
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 45
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...



edit : i typed to slow!!! : )
1 members found this post helpful.
Old 02-15-2004, 10:52 AM   #4
Andrew Benton
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
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.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Help: Remove a List of Files lukasbradley Linux - Newbie 2 08-17-2005 05:21 AM
command line handling folder/filenames Basslord1124 Linux - Newbie 1 03-25-2005 10:43 AM
Remove folder and file os2 Programming 1 03-12-2005 03:12 PM
folder names difference in KDE and the command line twallstr Linux - Newbie 2 10-04-2004 02:26 PM
how do I copy a whoel folder form one directory to another form the command line? zwyrbla Linux - Newbie 8 08-24-2004 07:40 PM

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration