homepage Welcome to WebmasterWorld Guest from 50.19.169.37
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Where should I store shell scripts?
Which directory
universetoday




msg:914567
 6:11 am on Jun 8, 2006 (gmt 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?

 

jtara




msg:914568
 6:08 pm on Jun 8, 2006 (gmt 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.

linsys




msg:914569
 4:23 am on Jun 14, 2006 (gmt 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/

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved