![]() |
|
|
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 |
| Remove logs by date | cvdev | SUN Solaris | 3 | 05-31-2008 03:09 AM |
| Remove the date from the file | pradkumar | UNIX for Dummies Questions & Answers | 5 | 01-10-2008 01:36 AM |
| how to remove files with a date | justintime | Shell Programming and Scripting | 5 | 09-10-2006 10:50 PM |
| How do I take out(remove) the date part in the file name? | ruthless | HP-UX | 5 | 02-06-2006 01:32 PM |
| Remove files based on date | hshapiro | UNIX for Dummies Questions & Answers | 4 | 12-09-2005 12:21 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Remove out date logs
hi all,
i would like to write the shell script to remove the out-dated log my log file name will be like this: access_20050101.log access_20050102.log . . . access_20071007.log access_20071008.log access_20071009.log i has try to write the command as following, it will be remove the log if older then 90 days, but if someone has modified the log, the file timestamp will be updated so how can i remove the log base on the file name? find /usr/local/apache2/logs -type f -mtime +90 -exec rm -f {} \; |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|