I've been trying to get the output of a cronjob to show in the terminal and I can't figure it out. Every minute I would like to run the script /usr/games/sl
and have it output in the terminal, and I've tried a few different ways, mainly the ones in this post. I can't just write the output to a text file because the command moves across the screen, and it gives gibberish when viewed with tail
or nano
.
I have two different variations in the crontab file at the moment:
* * * * * /usr/games/sl > /dev/pts/2 2>&1
* * * * * /usr/games/sl > /dev/tty1 2>&1
The second one at least gives me an error, Error opening terminal: unknown.
which I think is because I'm using tty1 and not pts/2. I don't really understand how terminals and all of that stuff work yet, so I am stuck at the moment. Does anyone have a suggestion on how I can view the cronjob in real time?
TL;DR Every minute I want the sl command to run on the screen and show the output. I tried with cronjobs and failed.
sl
? .. – Braiam Jun 04 '14 at 18:14