I have this cronjob: (it's a single line, I formatted it only here for better readability)
* 5-7 * * * (
sudo pstree -pa > "$HOME/log/`date "+\%F-\%T"`-pstree.txt";
sudo top -o \%MEM | head -25 > "$HOME/log/`date "+\%F-\%T"`-topMEM.txt";
sudo top -o \%CPU | head -25 > "$HOME/log/`date "+\%F-\%T"`-topCPU.txt"
)
The first command runs successfully, the file is created with pstree inside it.
But the second and third commands fail and result in empty files.
The only info in the the mail is:
'unknown': unknown terminal type.
I'm just starting out with Debian, etc, so sorry for the newbie question, any advice is welcome! :)