Friday, December 08, 2006

using cron on solaris

crontab -l

figure out whats in your cron, copy to a file called myCron
modify the file and add the crap you want
50 13 * * * /usr/local/subversion/
this runs the script at 1:50pm every day
then copy the file into the cron:

crontab < myCron


Monday, December 04, 2006

UNIX: delete files older then X days old

This can be useful when making a rolling backup script

find /directory -type f -mtime +12 | xargs rm

/directory: your directory name that the files are under (rename appropriately)
-type f: only delete files (not subdirectories)
+12: older than 12 days old