5

Housekeeping script

view full story
linux-howto

http://www.unix.com – I have a directory ( eg. /tmp , there are many files in it , I would like to do the houskeeping job , can advise how to develop a script to do the following . 1) if the files are elder than 10 days in this directory , the extension is .txt , then move it to /tmp/tmp-txt , the same , if the files are elder than 10 days in this directory , the extension is .csv , then move it to /tmp/tmp-csv 2) if the files in /tmp/tmp-txt and /tmp/tmp-csv are elder than 30 days , then tar it to a file and remove it from this directory . (HowTos)