Results 1 to 2 of 2
Is there a way to have a cron that say is just the command ls -lh in a directory output the info to an email for you? '
Do my ...
- 02-08-2003 #1Just Joined!
- Join Date
- Feb 2003
- Posts
- 1
How to setup a cron to email you
Is there a way to have a cron that say is just the command ls -lh in a directory output the info to an email for you? '
Do my cron would be just say "ls -lh /home" and I was want to output to get mailed to me? thanks..
- 02-08-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
No problem. If you just put "ls -lh /home" in a cron job, cron will automagically mail you the output. If you want to specify an email address, you can do it with the MAILTO variable in the crontab.


Reply With Quote
