![]() |
|
|
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 |
| Backup my files to DAT | jefferson | UNIX for Dummies Questions & Answers | 1 | 09-30-2007 11:13 PM |
| Counting Files and send an email Notification if it exceeds a limit | amitsayshii | UNIX for Dummies Questions & Answers | 10 | 07-07-2006 11:25 AM |
| backup files for a specific month | problems | Shell Programming and Scripting | 3 | 04-28-2006 04:53 AM |
| limit to number of files in a given directory | hedrict | UNIX for Advanced & Expert Users | 2 | 02-05-2004 04:14 PM |
| limit of files in the ufs filesystem | witt | UNIX for Dummies Questions & Answers | 2 | 06-25-2002 11:02 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Limit backup files
Hello all,
I am building a shell script. Every morning my shell script will trigger an external system backup script and the backup file (File Name format: "20030929backup.bkp" (i.e)current date + "backup.bkp") will be stored in the backup directory. After successful back, I need to keep only 10 backup files in the backup folder at most. Say on 11th day, day 1 file should be deleted and the 11th day file should be created. What's the best way to do this? I am using the below command to get the list of backup files from backup directory. $ find /home/EBI -name "*.bkp" -exec ls {} \; We need to calculate the calendar days. I thought of using (-atime +10) but, the thing is this backup script will not run on Sundays. So we miss one day... I guess we may need to count the number of backup files, find the oldest one, delete it and add the current file. What's the simple way to do this? Thanks. |
| Bookmarks |
| Tags |
| mailx, mailx attachment, sendmail |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|