Check the man pages for find, there are many options you could use.

Jeremiah E. Bess
Network Ninja, Penguin Geek, Father of four


On Thu, Nov 19, 2009 at 15:55, Packets Serafica <[email protected]>wrote:

> I'm almost done on my script. I'm just thinking if there are other
> parameters in find wherein I can search the files by month and not by
> mtime (modification time) and then tar it.
>
> Jeremiah Bess wrote:
> > For 1, best option is to run this script as a cron job when there is
> > little load on the server (midnight for example).
> > For 2, a simple for loop will run the backup commands for each user in
> > "/home". Example: "for user in /home/*; do {backup and delete
> > commands}; done". You would use $user/Maildir/backup as the variable
> > in the commands.
> > For 3, I use the command "find $BACKUPDIR -mtime +68 -delete" to keep
> > just over 2 months of backups, and then delete them. I use +68 so it
> > keeps a full week plus one day accounting for 31 days in a single
> > month. You can modify this and add to the for loop.
> >
> >
> > <http://groups.google.com/group/linuxusersgroup>
>
> --
> You received this message because you are subscribed to the Linux Users
> Group.
> To post a message, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit our group at
> http://groups.google.com/group/linuxusersgroup
>

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to