How to update.
I called the script update.sh and I was going to use it in a cron job after I tested it to make sure it worked. Can you tell me what I might have done wrong. Thank you in advance for your help.
@dam4 It is likely that two things are wrong.
First the script needs to be executable so please run:
$ chmod u+x update.sh
this will add execute permissions for the file owner to the file. Have a look at
man chmodfor more detail.
The next thing is to make sure that Linux knows where to look for it. This can be quite a complicated subject involving descriptions of the
$PATHenvironment variable and all sorts. But the easy way to do it is to add a relative or absolute path to the start of the command. So from the command prompt in the folder where the script exists try:
.means “this folder”. For the cron tab through you might want to use the full path something like:
0 2 * * * /full/path/to/file/update.sh
Hope at least some of that is meaningful for you.
Thank you. I did the chmod to make it executable but using the ./update.sh worked. Thank you again for your help.