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


Click here to return to the 'Replace /usr/bin/mail with Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Replace /usr/bin/mail with Mail.app
Authored by: designr on Sep 01, '03 02:39:26PM

With the help of (http://www.macosxhints.com/article.php?story=20030205064206934&query=introduction+to+find) a previous hint, I piped a search for all files greater than 1 GB in size to this mail script:

find /Users -size +2097152 -ls | mailalt -s "Files Larger than 1 GB" meacct@medomain.com

(A unix guru friend recommended saving the file as /usr/bin/mailalt and leaving /usr/bin/mail intact. His argument is that if Apple ever updates /usr/bin/mail, it will overwrite the script.)

While this requires a "^D" to run in the Terminal, it runs fine as a cron job (root).



[ Reply to This | # ]