RSS Forums RSS
Please support our Shell Scripting advertiser: Programming Forums
Views: 2063 | Replies: 7
Reply
Join Date: May 2007
Posts: 5
Reputation: Toktam is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Toktam Toktam is offline Offline
Newbie Poster

rm command

  #1  
May 25th, 2007
Hi everyone,

Is there any option for rm to remove a directory with no prompts?Actually I know about rm -r but by this option I have to answer lots of questions...

Cheers,
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 13,441
Reputation: jbennet is just really nice jbennet is just really nice jbennet is just really nice jbennet is just really nice 
Rep Power: 33
Solved Threads: 332
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: rm command

  #2  
May 25th, 2007
rm -rf i think?

that either does it, or deletes recursively. i cant remember. Google it. Be very careful if it is the latter
Last edited by jbennet : May 25th, 2007 at 8:03 am.
TRY MY SUGGESTIONS AT YOUR OWN RISK

Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Reply With Quote  
Join Date: Feb 2006
Posts: 1,561
Reputation: masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light 
Rep Power: 11
Solved Threads: 144
masijade's Avatar
masijade masijade is online now Online
Posting Virtuoso

Re: rm command

  #3  
May 25th, 2007
man rm

-r is recursive (including the directories)
-f force (don't ask)
-i interactive (ask before deleting)

Chances are, somewhere in the profile, whether in your shell or in /etc/profile is an alias that changes rm to rm -i.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 13,441
Reputation: jbennet is just really nice jbennet is just really nice jbennet is just really nice jbennet is just really nice 
Rep Power: 33
Solved Threads: 332
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: rm command

  #4  
May 25th, 2007
...
Last edited by jbennet : May 25th, 2007 at 11:07 am.
TRY MY SUGGESTIONS AT YOUR OWN RISK

Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Reply With Quote  
Join Date: Feb 2006
Posts: 1,561
Reputation: masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light 
Rep Power: 11
Solved Threads: 144
masijade's Avatar
masijade masijade is online now Online
Posting Virtuoso

Re: rm command

  #5  
May 25th, 2007
...
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Jul 2004
Location: Pakistan
Posts: 1,673
Reputation: nanosani is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 49
Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: rm command

  #6  
May 26th, 2007
Yes I use rm -rf for deleting folders and sub folders recursively without prompt.
Reply With Quote  
Join Date: Jun 2007
Posts: 11
Reputation: vrgurav is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
vrgurav vrgurav is offline Offline
Newbie Poster

Re: rm command

  #7  
Jun 19th, 2007
rm -f filename

-f don't prompt for confirmation

Hope this will solve your query
Reply With Quote  
Join Date: Jun 2007
Posts: 11
Reputation: vrgurav is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
vrgurav vrgurav is offline Offline
Newbie Poster

Re: rm command

  #8  
Jun 19th, 2007
rm -f filename

-f dont prompt for confirmation

Hope this will solve your query
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:57 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC