Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to do tmp and log directory clean up' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to do tmp and log directory clean up
Authored by: jaclyn on Sep 23, '04 04:42:58PM

Couple of things I had to change to get this to run without error ...

All of the finds with execs had to be changed. I had to add a backslash before the ; to avoid a find: -exec: no terminating ";" error. For example:


 /usr/bin/find . -maxdepth 1 -type f -name "*.gz" -mtime $old -exec rm {} \;

Also ran into a too many ('s error until I added continuation backslashes to the dir_list line:


set dir_list = (/private/var/tmp /private/var/spool/cups  \
                /private/var/spool/cups/tmp   \
                /Library/Logs/AppleFileService   \
                /Library/Logs/DirectoryService)

Otherwise I think it's working. I'm running it in test mode tonight to make sure....



[ Reply to This | # ]
A script to do tmp and log directory clean up
Authored by: szedula on Sep 23, '04 04:53:48PM

Sorry about that I just didn't notice the missing "\" when I posted the hint. They were in the original script.



[ Reply to This | # ]