这两个命令之间有实际区别吗?
/home/pkaramol/Desktop
$ sudo apt-file search logrotate.conf
logrotate: /etc/logrotate.conf
logrotate: /usr/share/man/man5/logrotate.conf.5.gz
petitboot: /etc/logrotate.d/petitboot/logrotate.conf
rsync: /usr/share/doc/rsync/examples/logrotate.conf.rsync
unicorn: /usr/share/doc/unicorn/examples/logrotate.conf
/home/pkaramol/Desktop
$ sudo apt-file find logrotate.conf
logrotate: /etc/logrotate.conf
logrotate: /usr/share/man/man5/logrotate.conf.5.gz
petitboot: /etc/logrotate.d/petitboot/logrotate.conf
rsync: /usr/share/doc/rsync/examples/logrotate.conf.rsync
unicorn: /usr/share/doc/unicorn/examples/logrotate.conf
/home/pkaramol/Desktop/centos_7
根据帮助:
search|find 搜索包中的文件
答案1
从man apt-file
:
search
是
Search in which package a file is included. A list of all packages
containing the pattern pattern is returned.
Since Contents files does not contain directories, the pattern must
match (part of a) file name.
By default, the search action interprets its pattern as if
--substring-match was specified.
并且find
是
Alias for search.
所以两者是相同的。