11-07-2008
57,
0
Join Date: Aug 2005
Last Activity: 21 May 2010, 6:01 AM EDT
Posts: 57
Thanks Given: 0
Thanked 0 Times in 0 Posts
#To purge the files which are older than 60 days
find [dir] -name [file] -mtime +60 -exec rm -rf {} \;
#gzipping the old Hi*.txt files
for i in `find [dir] -name [file] -mtime +59`
do
gzip $i
#write move cmd here: mv [source dir] [target dir]
done
#Please test the code before you implement.
Thanks
Sarwan