2

I wrote a script for my Red Hat server that aggregates some system info and shoots it off in an email. What is the appropriate location to place that script?

Right now it is in my /home/jeff directory but I doubt that is a very good practice. I tried moving it to /usr/bin/ but my permissions were denied and that scared me off from forcing it to be there.

Jeff
  • 335
  • 2
  • 4
  • 13

3 Answers3

3

It it's personal script, I think it's better to keep it in ~/bin/. If it's system-wide (will be used by other users and/or services), I'd agree with @Zoredache: /usr/local/bin/ will be a good place.

rvs
  • 4,125
  • 1
  • 27
  • 31
2

If it is a really minor script you could drop it /etc, there are already many scripts there that configure core functionality of your system. The location suggested by the FHS would be /usr/local/{bin|sbin}.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
1

Custom items should be segregated in an intelligent way so that drastic work on the system wil not inadvertently affect them. I favor using "opt" directories (i.e. /opt , /etc/opt, var/opt/log , etc.) and placing components appropriately within them, generally in further subdirectories associated with the organization or application (i.e. /etc/opt/gnome for example) .

Johnnie Odom
  • 1,199
  • 7
  • 10
  • 1
    The way I read the FHS suggest that `/opt` should be used for 3rd party software not your internal tools. Not saying that it would really harm anything if you have good documentation though. – Zoredache Mar 14 '12 at 19:52