Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Where should I store shell scripts?

Which directory



6:11 am on Jun 8, 2006 (gmt 0)

10+ Year Member

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?


6:08 pm on Jun 8, 2006 (gmt 0)

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 10+ Year Member

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.


4:23 am on Jun 14, 2006 (gmt 0)

5+ Year Member

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/


Featured Threads

Hot Threads This Week

Hot Threads This Month