linux - 用户脚本位置 linux (debian etch)

在linux文件系统中,用户脚本应该放在哪里?

我正在考虑专门由 cron 调用的 python 脚本。

最佳答案

我得到的信息:

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

来自 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.

感谢 Hydroxide

https://stackoverflow.com/questions/15171/

相关文章:

linux - 禁用内存地址的随机化

linux - bash 中的线程?

linux - 如何使用 AWK 合并两个文件?

windows - 帮助我让我的 windows cmd.exe 控制台更像一个 Linux 终端

linux - 使用包管理器时如何管理 Perl 模块?

linux - 如何将文件从远程服务器复制到本地计算机?

ruby - Gemfile.lock 写入错误,权限?

linux - 如何更改某些文件模式/扩展名的权限?

linux - PostgreSQL -bash : psql: command not found

linux - 仅当当前行中存在字符串时才替换