![]() |
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 |
| Need to remove files older than 30 days except directories | malaymaru | Shell Programming and Scripting | 6 | 11-13-2006 11:50 PM |
| Find files older than 20 days & not use find | halo98 | Shell Programming and Scripting | 2 | 05-18-2006 02:19 PM |
| tar files older than 30 days | wfch | UNIX for Dummies Questions & Answers | 6 | 04-19-2004 04:40 AM |
| How can I delete files older than 7 days? | odogbolu98 | UNIX for Dummies Questions & Answers | 3 | 02-26-2002 08:35 PM |
| delete files older than 7 days | lesstjm | UNIX for Dummies Questions & Answers | 1 | 11-06-2001 10:43 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I hope this isn't homework.
Code:
for FILE in `find /path/to/directory -mtime +5` do echo $FILE /bin/rm -f $FILE 2>/dev/null # Gets rid of directory or permission errors done |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|