RE: where to put shell scripts?
On 31-Oct-2000 Krzys Majewski wrote:
> I have a habit of writing many shell scripts for everything. Some of
> them are very local to me, so I put them in ${HOME}/shell and stick
> that in my PATH. Some of them may be generally useful, so although I
> don't have any users, I'm anal, and I put them in /usr/local/sbin/. I
> don't know what the "s" stands for, maybe "system"? This location
> works well enough except locally compiled system software may also put
> stuff there, in which case we have both binaries and sh scripts in the
> same directory, is that OK? Any better suggestions? -chris
>
bin (whether bin or sbin) is more correctly name "executable". If you look in
/usr/bin or /usr/sbin you will find sh, perl, awk, python, etc scripts.
If it is a system maintenance script or one that should be run by admins, sbin
is the way to go. Otherwise, it belongs in bin. You will note that /sbin and
/usr/sbin or rather small compared to /bin and /usr/bin. Also sbin directories
tend not to be in the average user's path.
Reply to: