rm command

Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2007
Posts: 5
Reputation: Toktam is an unknown quantity at this point 
Solved Threads: 0
Toktam Toktam is offline Offline
Newbie Poster

rm command

 
0
  #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,
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,273
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 543
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: rm command

 
0
  #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.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: rm command

 
0
  #3
May 25th, 2007
Shell Scripting Syntax (Toggle Plain Text)
  1. man rm
  2.  
  3. -r is recursive (including the directories)
  4. -f force (don't ask)
  5. -i interactive (ask before deleting)
  6.  

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 Quick reply to this message  
Join Date: Apr 2005
Posts: 16,273
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 543
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: rm command

 
0
  #4
May 25th, 2007
...
Last edited by jbennet; May 25th, 2007 at 11:07 am.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: rm command

 
0
  #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 Quick reply to this message  
Join Date: Jul 2004
Posts: 1,749
Reputation: nanosani is an unknown quantity at this point 
Solved Threads: 54
Team Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: rm command

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

Re: rm command

 
0
  #7
Jun 19th, 2007
rm -f filename

-f don't prompt for confirmation

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

Re: rm command

 
0
  #8
Jun 19th, 2007
rm -f filename

-f dont prompt for confirmation

Hope this will solve your query
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Shell Scripting Forum
Thread Tools Search this Thread



Tag cloud for Shell Scripting
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC