![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Deleting / finding files older than X days missess a day | guruparan18 | Shell Programming and Scripting | 4 | 05-08-2008 07:09 AM |
| Removing files older than 7 days | texasoeb | UNIX for Dummies Questions & Answers | 3 | 04-20-2007 05:04 PM |
| tar files older than 30 days | wfch | UNIX for Dummies Questions & Answers | 6 | 04-19-2004 05: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 |
|
|
|
||||
|
Deleting files older than 7 days
Hi Guys,
I want to delete folder/files older than 7 days. Im using the command below. find /test/test1 -mtime +7 -print0 | xargs -0 rm -Rf /test/test1/* which works ok, but it deletes the test1 folder as well which i dont want. The test1 folder will have a list of sub-folders which in turn will have files.I wont know the name of these sub-folders or files. I want to delete these sub -folders and files and preserve the test1 folder. Any one any ideas. Help much appreciated. Thanks. |
|
||||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|