Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a program, say

while ( true ){
    echo 'hello'
    sleep 10

Which is started from the crontab like so

0 0 1 1 *

I can list this running process using a command like

ps aux | grep

Is there a way I can view the stdout of this script after it's been started from the crontab?

share|improve this question

You can redirect the output to a file and then read it with tail.

while ( true ){
    echo 'hello' >> $HOME/tmp/log
    sleep 10

Now you can view the output with tail.

tail -f $HOME/tmp/log
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.