Need a script to move files where their last mod date <= 'xx
MMM yyyy'
Evan
evan_lsa at internode.on.net
Thu Nov 9 09:33:48 CST 2006
thanks for all the replies.
As I said I am looking for help on a script
man script doesnt help neither does google.
I am aware of find cp and mv
I expect I should iterate through the find results and move the
respective files but I was thinking of a cp or mv flag which will do
what I want without resorting to a foreach loop.
my scripting skills are limited hence my question.
thanks anyway
evan
Jon Soong wrote:
> 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