-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/26/07 23:13, Michael Pobega wrote: > I'm pretty new to cron jobs, and I've just started playing around with > them pretty recently. > > I'd like to be able to create a cron job that does a weekly archive of > all of my folders in ~/mail. The way I have my mail set up is one > folder per box, for example my folders are: > > ~/mail/inbox > ~/mail/debian-user > ~/mail/sent
These are mbox files? It would help see the complete directory structure. > I'd like the Cron job to archive these on a weekly basis, but not > exactly on a weekly basis. > > The part that is tough for me to figure out is...I want the cron job > to only archive when the file is a week old. So I'd need it to do a > daily check of my folders and their contents (And the dates they were > created), and if they're older than seven days old move them into > ~/mail/archives/<folder> (Archive would be a mirror image of the > directories in ~/mail). If these are mbox files, there will be a problem if you try to Receive new emails (or compact folders or move mails from folder to folder, etc) while the job happens to be running. > I imagine something like this can be done in bash or similar, but I > have no experience doing bash. Yes, but... there's always a spanner in the gears. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF48BpS9HxQb37XmcRAlDUAJ9SyoPnO1YWn6aZy83wZHxUdtHmqwCglhCa eVWvzt9EIToQmBD+kKwFSe8= =jz4t -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]