![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 | Red Hat | 1 | 04-25-2008 11:06 AM |
| Deleting Files | bc4 | UNIX for Dummies Questions & Answers | 1 | 01-25-2007 11:27 PM |
| Deleting files | BG_JrAdmin | SUN Solaris | 1 | 11-29-2006 01:17 AM |
| Lots of file copyingand renaming? | AeroEngy | UNIX for Dummies Questions & Answers | 12 | 08-03-2005 09:59 PM |
| Deleting the files | livetaurean19 | Shell Programming and Scripting | 0 | 06-16-2005 04:16 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi All,
Thanks in advance for reading and any posts... I have to delete a lot of files (about 6 pages of a4 (ls -ltr)) but I have to keep some as well. I would normally do an rm * to get rid of them all, but thats not what I want to do. Is there anyway I could rm * but add in a list of files that I don't want to delete. Thanks for reading and any posts, Mark. |
|
||||
|
When I run that I get the following error:
grep: illegal option -- f Usage: grep -hblcnsviw pattern file . . . [2] + Done(2) ls -1 | grep -v -f goodfiles | \;while read filee Any ideas???? Thanks again, B14...aka... marky mark.... |
|
||||
|
Check if your grep supports -v and -f options...
type Code:
man grep If you are on Sun Solaris box, some options are supported by Code:
/usr/xpg4/bin/grep Code:
/usr/bin/grep See if it works!! |
|
||||
|
Come across a possibly simpiler way (un specified way), you can do the following if you want delete old files:
HTML Code:
find [path] -mtime +[integer] -exec rm {} \;
|
| Sponsored Links | ||
|
|