LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-22-2004, 11:31 AM   #1
wisdom
Member
 
Registered: Feb 2004
Distribution: Fedora 9
Posts: 226

Rep: Reputation: 31
removing folders & its contents


just wondering is their not a command that i can use in the terminal to remove a folder and it's content WITHOUT confiming each file or folder to be removed from it ... hence just type the command and it delete the whole folder and its content in one go?
 
Old 12-22-2004, 11:33 AM   #2
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,832

Rep: Reputation: 47
Then It will be not Linux but Windoze XPee

Security,man, security!!
 
Old 12-22-2004, 11:42 AM   #3
mtaylor57
Member
 
Registered: Jun 2004
Location: Houston
Distribution: Suse, Redhat
Posts: 48

Rep: Reputation: 15
try:

rm -r directory

It will ask you to confirm, and then gone!
 
Old 12-22-2004, 11:47 AM   #4
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,832

Rep: Reputation: 47
actually, same thing can be done using mc
 
Old 12-22-2004, 12:04 PM   #5
wisdom
Member
 
Registered: Feb 2004
Distribution: Fedora 9
Posts: 226

Original Poster
Rep: Reputation: 31
rm -r does what i dont want which is confirming the files
 
Old 12-22-2004, 12:12 PM   #6
LasseW
Member
 
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108

Rep: Reputation: 15
You probably have rm aliased to 'rm -i', type alias to verify this. You can remove it temporarily with

unalias rm

If you want to remove the alias permanently you'll have to edit one of your login files.
 
Old 12-22-2004, 12:15 PM   #7
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Just type 'rm -rf' (the f option overrides the prompting and will just delete the file)
 
Old 12-22-2004, 02:00 PM   #8
rbochan
Member
 
Registered: Dec 2004
Location: Central New York
Distribution: Debian
Posts: 218

Rep: Reputation: 30
at the console, type:

man rm
 
Old 12-22-2004, 02:15 PM   #9
wisdom
Member
 
Registered: Feb 2004
Distribution: Fedora 9
Posts: 226

Original Poster
Rep: Reputation: 31
chears for that will try out sugestions
 
Old 12-24-2004, 01:42 AM   #10
chumisekar
LQ Newbie
 
Registered: Dec 2004
Posts: 19

Rep: Reputation: 0
rm -f is the command u wanted . That deletes with out any confirmation

sumithra
 
Old 12-24-2004, 02:03 AM   #11
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
OK here's the solution: you want to delete a folder and everything in it without being prompted, then
Code:
rm -rf folder
is what you want. Already mentioned above. -r is recursive so that it goes INTO the folder and all subfolders, and -f forces the removal without asking you, and overrides the -i option which prompts you to remove files one by one.
 
Old 12-24-2004, 03:10 AM   #12
n0xvb
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; openSUSE 11.2
Posts: 255

Rep: Reputation: 34
I use
Code:
rm -R <directoryname>
No prompting or anything. Just a term prompt and a missing directory
 
  


Reply


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
Thunderbird hanging & not updating folders hallamigo Linux - Software 7 04-30-2005 12:43 PM
Apache 2.0, I want to list dir contents & password protect... Scrag Linux - Software 3 02-10-2005 12:38 PM
How to compare two folders contents? rvoigt Linux - Newbie 6 01-07-2005 01:35 AM
Inporting files & folders ? fin Linux - Newbie 4 03-28-2003 11:00 PM
ftp: Download folders and contents plisken Linux - General 3 02-20-2002 04:30 AM

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

All times are GMT -5. The time now is 08:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration