The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Lots of questions about linux. Methal Linux 1 04-25-2008 08:06 AM
Deleting Files bc4 UNIX for Dummies Questions & Answers 1 01-25-2007 07:27 PM
Deleting files BG_JrAdmin SUN Solaris 1 11-28-2006 09:17 PM
Lots of file copyingand renaming? AeroEngy UNIX for Dummies Questions & Answers 12 08-03-2005 06:59 PM
Deleting the files livetaurean19 Shell Programming and Scripting 0 06-16-2005 01:16 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8 (permalink)  
Old 06-09-2006
Registered User
 

Join Date: Mar 2006
Location: South Yorkshire, UK
Posts: 114
Stumble this Post!
If I want to keep just a few (non-huge) files and delete the rest then I often move the ones to be kept into another directory, rm * those left and then move the other files back. It has the advantage of letting you list the files to be kept to check that they are all there before doing anything irrevocable!

If the number of files to delete is small then you could use "rm -i *" and be prompted to confirm each file is to be deleted.

cheers
Reply With Quote
Forum Sponsor
  #9 (permalink)  
Old 06-09-2006
reborg's Avatar
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,513
Stumble this Post!
if it's a Solaris machine, just use fgrep.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mtime

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0