Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User script location linux (debian etch) [closed]

Tags:

linux

debian

In the linux file system, where should user scripts be placed?

I'm thinking specifically python scripts to be called by cron.

like image 209
Christopher Mahan Avatar asked Aug 18 '08 20:08

Christopher Mahan


2 Answers

the information i got:

/usr/local/sbin     custom script meant for root /usr/local/bin      custom script meant for all users including non-root 

chatlog snips from irc.debian.org #debian:

(02:48:49) c33s: question: where is the _correct_ location, to put custom scripts for the root user (like a script on a webserver for createing everything needed  for a new webuser)? is it /bin, /usr/local/bin,...? /usr/local/scripts is  mentioned in (*link to this page*) (02:49:15) Hydroxide: c33s: typically /usr/local/sbin (02:49:27) Hydroxide: c33s: no idea what /usr/local/scripts would be (02:49:32) Hydroxide: it's nonstandard (02:49:53) Hydroxide: if it's a custom script meant for all users including  non-root, then /usr/local/bin (02:52:43) Hydroxide: c33s: Debian follows the Filesystem Hierarchy Standard,  with a very small number of exceptions, which is online in several formats at  http://www.pathname.com/fhs/ (also linked from http://www.debian.org/devel/ and  separately online at http://www.debian.org/doc/packaging-manuals/fhs/fhs-2.3.html) (02:53:03) Hydroxide: c33s: if you have the debian-policy package installed, it's  also in several formats at /usr/share/doc/debian-policy/fhs/ on your system (02:53:37) Hydroxide: c33s: most linux distributions follow that standard, though  usually less strictly and with more deviations than Debian. 

thanks go out to Hydroxide

like image 162
c33s Avatar answered Oct 06 '22 01:10

c33s


If you're talking about scripts created by a user that will be run from that users crontab, I typically put those in either a bin or scripts folder in the home directory, or if they're intended to be shared between users, a /usr/local/scripts directory.

like image 32
Matt McMinn Avatar answered Oct 06 '22 02:10

Matt McMinn