列出自制程序包中的所有文件


92

如何获得homebrew列出为软件包安装的所有文件?例如,当我运行brew listexim程序包时,将获得以下文件:

$ brew list exim
/usr/local/Cellar/exim/4.80.1/bin/exiwhat
/usr/local/Cellar/exim/4.80.1/bin/exiqsumm
/usr/local/Cellar/exim/4.80.1/bin/exiqgrep
/usr/local/Cellar/exim/4.80.1/bin/exipick
/usr/local/Cellar/exim/4.80.1/bin/exinext
/usr/local/Cellar/exim/4.80.1/bin/eximstats
/usr/local/Cellar/exim/4.80.1/bin/exim_tidydb
/usr/local/Cellar/exim/4.80.1/bin/exim_lock
/usr/local/Cellar/exim/4.80.1/bin/exim_fixdb
/usr/local/Cellar/exim/4.80.1/bin/exim_dumpdb
/usr/local/Cellar/exim/4.80.1/bin/exim_dbmbuild
/usr/local/Cellar/exim/4.80.1/bin/exim_ctl
/usr/local/Cellar/exim/4.80.1/bin/exim_checkaccess
/usr/local/Cellar/exim/4.80.1/bin/exim-4.80.1-3
/usr/local/Cellar/exim/4.80.1/bin/exim
/usr/local/Cellar/exim/4.80.1/bin/exigrep
/usr/local/Cellar/exim/4.80.1/bin/exicyclog
/usr/local/Cellar/exim/4.80.1/share/man/man8/exim.8

但是有一些文件添加到系统中,但不在上面的列表中。例如:

$ ls -ld /usr/local/etc/exim.conf 
-rw-r--r--  1 hanxue  admin  35904 Sep 25 21:11 /usr/local/etc/exim.conf

Answers:


73

只需添加-v--verbose,例如:

$ brew ls --verbose exim

5
尽管该命令递归到已安装的目录并列出了其中包含的所有文件,但并未在原始文章中列出exim.conf文件。它通过brew install操作添加的。
MSpreij 2015年

1
@MSpreij MacPorts实际上没有此问题,因为它在将所有文件移动到最终位置之前会跟踪所有将安装的文件。Homebrew根本不执行此操作,因此/usr/local/etc,除非手动删除配置文件,否则其他位置的配置文件都将保留。自制程序仅与程序有关,而与程序留下的设置或其他残余无关。这是MacPorts文档中的一部分,解释了它们如何避免此问题。
GDP2
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.