![]() |
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 |
| 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 |
| Archiving Problem | bintaleb | UNIX for Dummies Questions & Answers | 2 | 03-11-2007 07:47 AM |
| Archiving | dreams5617 | Shell Programming and Scripting | 1 | 10-20-2006 06:33 AM |
| Archiving Users | suseesk | Shell Programming and Scripting | 2 | 04-10-2006 10:10 AM |
| archiving a directory using tar | harminder | UNIX for Dummies Questions & Answers | 2 | 09-22-2005 06:23 AM |
| Archiving | rmasonuk | UNIX for Dummies Questions & Answers | 7 | 11-10-2003 02:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Archiving by Time
Hi all. I am trying to set up archiving of directories, such that I keep every directory made in the past week, but just one directory per week beyond that. Using the find command, I can easily delete everything more than one week old, but can not figure out how to save one.
Each directory contains a single zip file. I'd prefer to keep the one with the largest zip file, but this is not necessary. If someone can tell me how I can keep just one directory, regardless of criteria, I would be greatly appreciative. I realize that this could probably be done by hand, but a zip file and directory is created ~every 30 minutes, so it would be rather tedious. Thanks for any help you can provide. EDIT: This archiving is currently done (deleting everything more than a week old) in a shell script that is called by the program. This script creates and moves the zip file from a bunch of jpg's. Hence, I figured this was the correct sub-forum. If not, let me know and I will be glad to move it. Last edited by aefskysa; 07-18-2008 at 06:43 AM.. Reason: Addition |
|
||||
|
That is quite helpful, but seems to be missing the final step. Once I pick out that file, how can I execute any other command on it? I am thinking I just want to 'touch' that file and make the date far enough in the past that the script will cease caring about it. Thanks again.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|