examples:
debian:~# apt-file update
debian:~# apt-file find /usr/sbin/exim4
exim4-daemon-heavy: usr/sbin/exim4
exim4-daemon-heavy-dbg: usr/lib/debug/usr/sbin/exim4
exim4-daemon-light: usr/sbin/exim4
exim4-daemon-light-dbg: usr/lib/debug/usr/sbin/exim4
Bin Tian wrote:
debian:~#
apt-cache show apt-file
Package: apt-file
Priority: optional
Section: admin
Installed-Size: 96
Maintainer: Sebastien J. Gross <sjg@debian.org>
Architecture: all
Version: 2.0.8.2
Depends: perl, wget | curl, gzip (>= 1.2.4), libconfig-file-perl,
libapt-pkg-perl
Suggests: ssh, sudo
Filename: pool/main/a/apt-file/apt-file_2.0.8.2_all.deb
Size: 12902
MD5sum: 369114261071e005a8b54b250208fb91
SHA1: ebab2159475c5699cd56a731afbe534bfa285061
SHA256: 0b53d7f7d28bbe957e3eb2289d033c2ae6f6932459bd97f1d503b8bbb03eb970
Description: APT package searching utility -- command-line interface
apt-file is a command line tool for searching packages for the APT
packaging system.
.
Unlike apt-cache, you can search in which
package a file is included
or list the contents of a package without installing or fetching it.
.
Please read README file for curl or wget instructions.
Tag: implemented-in::perl, interface::commandline,
role::program,
suite::debian, use::searching, works-with::file,
works-with::software:package
debian:~#
Vern Sun wrote:
find -type f -exec echo "=========================" "{}"
\; -exec dpkg -c "{}" \; | less +/somefile
在07-3-3,Vern
Sun <
s5unty@gmail.com> 写道:
因
为我要找的不是本机上安装的deb包,所以dpkg -S是不行的。
假设在/sun目录下多个deb包,其中一个含有文件somefile,我用
find -type f -exec dpkg -c "{}" \; | less +/somefile,能找到该文件。但是dpkg
-c不会列出包名,所以我还是不知道somefile属于哪个包?
不用脚本能否实现,如果要写脚本,应该怎样写?谢谢!
--
Vern
|