Hello glass sphere
Please i need any little script to delete the oldest after the 5 Version, of this Output from this log file creator.
FILE="lalala_$(date +%b)_$(date +%d)_$(date +%Y)_$(date +%S)sec."
/bin/cat /var/filename >/var/filename/$FILE
with Find i have try but there are to dangerous... she will delete all that older than 5 day.
thanks
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Script, need file-delete, the oldest, after the 5 Log entry
- sunrat
- Administrator
- Posts: 6495
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: Script, need file-delete, the oldest, after the 5 Log en
There's a default program that does that:
Code: Select all
man logrotate
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!