Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #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..

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Täby, Sweden
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts