LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 02-15-2004, 09:34 AM   #1
demmylls
Member
 
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, 09:50 AM   #2
rberry88
Member
 
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:

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

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

Rep: Reputation: 46
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!!! : )
 
1 members found this post helpful.
Old 02-15-2004, 09: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.
  


Reply



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 04:21 AM
command line handling folder/filenames Basslord1124 Linux - Newbie 1 03-25-2005 09:43 AM
Remove folder and file os2 Programming 1 03-12-2005 02:12 PM
folder names difference in KDE and the command line twallstr Linux - Newbie 2 10-04-2004 01: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 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:13 PM.

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