Need a script to move files where their last mod date <= 'xx MMM yyyy'

Jon Soong Jon.Soong at imvs.sa.gov.au
Thu Nov 9 07:36:48 CST 2006


You could just use logrotate program to do it for you?

 

>-----Original Message-----
>From: Evan [mailto:evan_lsa at internode.on.net] 
>Sent: Thursday, 9 November 2006 11:39 AM
>To: lsa
>Subject: Need a script to move files where their last mod date 
><= 'xx MMM yyyy'
>
>List,
>I am looking at some rotation of logs etc and I don't want to 
>lose the info just move it as it clutters up the directory.
>
>I will run it in a cron job but for my own edification I am 
>after something to cp the files and then rm or mv for last mod 
>< specific day.
>
>Bash script iterating will work or even Perl (I am slowly 
>becoming useless in it which is 1 up from yesterday)
>
>Cheers
>Evan
>--
>LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on 
>irc.freenode.net To unsubscribe or change your options:
>  http://www.netcraft.com.au/mailman/listinfo/linuxsa
>
>



More information about the linuxsa mailing list