Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Where should I store shell scripts? Which directory universetoday
I'm still learning the webmastering trade, and I'm writing some simple shell scripts to run some backups. I know this is a strange question, but where should I store them? In my /home directory? Is there some place people commonly keep them?
Shell scripts generally go in the same place that executables go.
If the script is only used by a particular account, put it in that account's ~/bin directory. If it is used by multiple users, it would typically go in /usr/local/bin, /opt, etc.
In this particular case, since these are "system maintainence" type of scripts, I would put them in /usr/local/sbin.
They can really go anywhere, in allmost every large corporate environment I've worked in we stored them in /usr/local/scripts then added that to the PATH environment variable.
If you don't have access to /usr/local/scripts I would put them in /home/username/bin/