3 ms·
Could always add this to your crontab */20 * * * * root find / -name ".DS_Store" -depth -exec rm {} \;
by torstenvl 6y ago
Could always add this to your crontab
*/20 * * * * root find / -name ".DS_Store" -depth -exec rm {} \;
- LeoPanthera 6y agoNo need for "-exec rm", you can use "-delete". And probably better to limit this to "~" rather than "/".
- torstenvl 6y agoI disagree. If anything, inside your home directory is the one place where .DS_Store files are potentially useful and not harmful. And -delete has limitations regarding files that aren't within the current working directory or its subdirectories (I don't know what the "current working directory" is for cron off the top of my head).
- boring_twenties 6y agoEven if that's true, you should use xargs, not -exec
- boring_twenties 6y agoThe Correct(tm) way: find [whatever] -print0 | xargs -0 rm