In UNIX, I read that moving a shell script to /usr/local/bin will allow you to execute the script from any location by simply typing "[scriptname].sh" and pressing enter.
I have moved a script with both normal user and root permissions but I can't run it.
The script:
#! bin/bash
echo "The current date and time is:"
date
echo "The total system uptime is"
uptime
echo "The users currently logged in are:"
who
echo "The current user is:"
who -m
exit 0
This is what happens when I try to move and then run the script:
[myusername@VDDK13C-6DDE885 ~]$ sudo mv sysinfo.sh /usr/local/bin
[myusername@VDDK13C-6DDE885 ~]$ sysinfo.sh
bash: sysinfo.sh: command not found