Re: Where to put scripts
Le mardi 6 mars 2007 18:10, José Pablo Fernández a écrit :
> Hello,
> we are creating lot's of little scripts on our servers, some in bash, some
> in python and other languages may be picked as well. Currently we have a
> mess, scripts all
> over... /bin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin,
> /root/bin and even other weird locations (/usr/src/...) depending on who
> wrote the script.
> I want to standardize on one and only one location for these scripts. It'll
> be versioned and it'll be backed up. Any recommendation on where to put
> these scripts? Any best or common practice?
> Thank you.
Hi,
this is my comprehension of this organisation:
'sbin' directories are for system tools, those which are typically only used
by the root user (they are by default in the PATH of the root user only)
while 'bin' ones are for general programs.
/sbin and /bin are for very common tools which may be required at boot time
before the /usr partition is mounted and /usr/bin and /usr/sbin are for
everything else
/usr/local is for user programs, it's the default installation directory of
manually compiled programs. I think it's a good idea to keep everything you
do here to avoid interfering with debian packages.
So I'd suggest /usr/local/bin for programs called by normal user
and /usr/local/sbin for those only used by root. If you prefer, you can also
put them all in another directory to keep things more clear,
say /usr/local/myscripts/bin and /usr/local/myscripts/sbin.
--
Cédric Lucantis
Reply to: