Hi ricardo35.
A few thoughts:
I'd start by making sure your script has execute permissions:
Code:
chmod a+x /home/ricardo/Scripts/move.sh
This
Code:
No MTA installed, discarding output
usually means, the script is producing an output to a terminal, and cron tries to send you a mail with the text. Since the mail alerts are not configured by default, the script fails.
You can solve that by redirecting the output of your script to /dev/null, or better to a log file so you can debug it:
Code:
* * * * * /home/ricardo/Scripts/move.sh >> ~/log.log 2>&1
Then, you could check that file later to review the output.
There should be no space between the shebang and the shell's path:
Do not use interactive shell commands in your script: remove the 'clear' command.
Since you are registering the output of your script now, be more verbose so the log is more meaningful
Code:
date
mv -v ~/Scans/* ~/Stack/Tunnel/Scans/
echo done
echo
If the scanner doesn't generate unique names, very common problem in my opinion, you will be either overwriting, and thus losing files, or triggering a interactive prompt to confirm the move. To avoid that situation, you can use the --backup option:
Code:
mv -iv --backup=numbered ....
Hope that helps. Let us know how it goes.
Regards.
Bookmarks