I have a silly question

Can anyone tell me where is the best place to put my own system related scripts on a solaris server.

I usually place my scripts in /usr/sbin/<my_name>, but that is only because my senior sysadmin used to do that.

What does the "unix etiquette" say?

I suggest /usr/local/sbin. I consider /usr/sbin to be the "property" of the OS.

It can be anywhere. Some even create /usr/local/scripts dir and put the scripts in there

Sorry to contradict the previous answers but if you want to strictly compliant with the SVR4 and Solaris standards don't use /usr/sbin, /usr/local/bin or /usr/local/scripts or "anywhere" which all violate them.

The whole /usr tree belong to the OS so you shouldn't put your files here.

The recommended location would be: /opt/<your package name>/[bin] or possibly /opt/local/bin if you have no package name to provide.

Should your script need some configuration files, you would put them in /etc/opt/<package> and should your scripts want to write log files, they should go in /var/opt/<package>.

Of course, nobody is going to sue you if you don't follow these standards but you might be in trouble if one day the OS decides to remove, overwrite or forbids you to write to a file/directory you wrongly though was suitable ...

/usr/local/bin is where my stuff usually goes :smiley:

we also have a NAS mount with many of the scripts we need across multiple systems.

I wasn't aware of those standards. Do you have a link? I'd like to read them. I looked around and I could find is this: Filesystem Hierarchy Standard

Solaris standards are described in some of the 5th manual pages.
"man filesystem" on a Solaris machine describes the one related to the file system layout.

:)This is indeed a "silly" question and "silly" answers. :stuck_out_tongue:

For what it's worth here's what I do:

On systems I support but do not control I put then in /usr/scripts/bin.

On systems I own I create a directory off of root and put everything in there, like:
/application_name/bin (scripts go here)
/application_name/etc
/application_name/rc.d
/application_name/log
..etc...