I have a cron job and its output is now redirected into a file. It looks like the following
0 9 * * * /bin/sh /bin/cleanup.sh > /home/darkknight/cleanup.log
Run cat /home/darkknight/cleanup.log
then you get the output on STDOUT.
If you can't see what you expect as output, maybe you need to modify the cron as following:
0 9 * * * /bin/sh /bin/cleanup.sh > /home/darkknight/cleanup.log 2>&1
To get what cleanup.sh
writes on its STDERR.
If you don't want to lose the output of yesterday, modify as following:
0 9 * * * /bin/sh /bin/cleanup.sh >> /home/darkknight/cleanup.log 2>&1
Or, just execute /bin/sh /bin/cleanup.sh
then you get both STDOUT and STDERR on your terminal.