|
|
find ?
Nice cron, but why "-mindepth 1 -maxdepth 1" ?
find ?
find ?
Thanks, I'll be adding this tonight!
find ?
Couldn't get it to work in crontab, but I was successful id creating a launchd LaunchAgent. Great tip, nice and simple. No need for a program or long script. Thanks!
If interested, the launchd script is: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Disabled</key> <true/> <key>Label</key> <string>com.tony.DeleteTrash7DaysOld</string> <key>ProgramArguments</key> <array> <string>/usr/bin/find</string> <string>/Users/Tony/.Trash</string> <string>-mindepth</string> <string>1</string> <string>-maxdepth</string> <string>1</string> <string>-newerat</string> <string>-not</string> <string>7 days ago</string> <string>-delete</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceDescription</key> <string>DeleteTrash7DaysOld</string> </dict> </plist>
find ?
Nice too, though I'm surprised it did not work in cron :(
find ?
Not sure why I couldn't get cron to work. It should have, but while trying to figure out the problem I leaned that Apple has depreciated cron since 10.4 in favor of launchd (a google or wiki will give background on this). Lingo, a nice freeware app, is helpful in writing launchd playlists. One advantage of using launchd over cron is that I can specify RunAtLoad (good for me as I have a laptop that I don't keep running 24/7)
find ?
I noticed an error. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|