Welcome to WebmasterWorld Guest from 50.16.113.179

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)

Full Member

10+ Year Member

joined:May 21, 2003
posts:333
votes: 0


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 June 8, 2006 (gmt 0)

Senior Member

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

joined:Nov 26, 2005
posts:3041
votes: 0


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 June 14, 2006 (gmt 0)

New User

10+ Year Member

joined:June 10, 2006
posts:38
votes: 0


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/

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members