哪些GNU coreutils应用程序包含在MacPorts coreutils包中?


3

一般来说,我想知道MacPorts coreutils和GNU coreutils之间是否存在任何差异,以及我如何自己回答这个问题。特别是,我不明白为什么su命令(或gsu命令,因为所有MacPorts coreutils应用程序似乎也带有'g'前缀)似乎不包含在MacPorts中。

首先,我检查我是否安装了coreutils包:

$ port installed coreutils
The following ports are currently installed:
  coreutils @8.22_0 (active)

$ port info coreutils
coreutils @8.22 (sysutils)
Variants:             universal

Description:          The GNU Core Utilities are the basic file, shell, and text manipulation utilities of the GNU operating
                      system. These are the core utilities which are expected to exist on every operating system. Previously
                      these utilities were offered as three individual sets of GNU utilities, fileutils, shellutils, and
                      textutils. Those three have been combined into a single set of utilities called the coreutils.
Homepage:             http://www.gnu.org/software/coreutils/

[...]

到现在为止还挺好。然后我找实例sugsu我的路径:

$ which -a su gsu; 
/usr/bin/su

没有; GNU su不在那里。作为一个完整性检查,我寻找其他一些coreutils应用程序,例如rm

which -a rm grm
/opt/local/libexec/gnubin/rm
/bin/rm
/opt/local/bin/grm

它看起来像目录检查是/opt/local/bin/opt/local/libexec/gnubin,所以我期待有:

$ ls -1 /opt/local/bin /opt/local/libexec/gnubin | grep -x 'su\|gsu'

再一次,没有。现在,这几乎肯定是多余的,但我也尝试用port contents命令查找:

$ port contents coreutils | grep -x ".*su"

没有。我确定su包含在GNU coreutils中吗?不,我猜不是。所以我在这里查看:

http://en.wikipedia.org/wiki/GNU_Core_Utilities#Programs_included_in_coreutils

它看起来像是; 它列在Shell Utililites标题下。什么给出了什么?

Answers:


4

自从v8.18开始,su已经从coreutils转移到了utils-linux项目,因为它与PAM等中的linux特定例程更加一致.http://git.sv.gnu.org/gitweb/?p = coreutils.git ;一个=提交; H = 928dd737

为了更轻松,更轻量地切换用户凭据,可以使用gchroot --user = ... /

我已经适当地修改了维基百科

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.