我已经安装了两个名为maven
和的开发工具,ant
使用以下命令:
sudo apt-get install maven ant
我如何才能发现这些工具在我的系统上的安装目录?
答案1
通过dpkg-query
:
dpkg-query -L maven
dpkg-query -L ant
或者使用过滤器grep
dpkg-query -L maven | grep '^/usr/bin'
示例输出
$ dpkg-query -L mc
/.
/usr
/usr/share
/usr/share/applications
/usr/share/applications/mc.desktop
/usr/share/doc
/usr/share/doc/mc
/usr/share/doc/mc/README.Debian
/usr/share/doc/mc/NEWS.Debian.gz
/usr/share/doc/mc/changelog.Debian.gz
/usr/share/doc/mc/copyright
/usr/share/pixmaps
/usr/share/pixmaps/mc.xpm
/usr/share/menu
/usr/share/menu/mc
/usr/share/mc
/usr/share/mc/bin
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/mc
/usr/bin
/usr/bin/mc
/usr/lib
/usr/lib/mc
/usr/lib/mc/extfs.d
/usr/lib/mc/extfs.d/patchfs
/usr/lib/mc/extfs.d/lslR
/usr/lib/mc/extfs.d/debd
/usr/lib/mc/extfs.d/mailfs
/usr/lib/mc/extfs.d/ulha
/usr/lib/mc/extfs.d/hp48+
/usr/lib/mc/extfs.d/ualz
/usr/lib/mc/extfs.d/a+
/usr/lib/mc/extfs.d/uc1541
/usr/lib/mc/extfs.d/changesetfs
/usr/lib/mc/extfs.d/bpp
/usr/lib/mc/extfs.d/ucab
/usr/lib/mc/extfs.d/audio
/usr/lib/mc/extfs.d/uha
/usr/lib/mc/extfs.d/deb
/usr/lib/mc/extfs.d/urar
/usr/lib/mc/extfs.d/uarc
/usr/lib/mc/extfs.d/uzip
/usr/lib/mc/extfs.d/dpkg+
/usr/lib/mc/extfs.d/ulib
/usr/lib/mc/extfs.d/uar
/usr/lib/mc/extfs.d/uzoo
/usr/lib/mc/extfs.d/README
/usr/lib/mc/extfs.d/apt+
/usr/lib/mc/extfs.d/iso9660
/usr/lib/mc/extfs.d/rpms+
/usr/lib/mc/extfs.d/deba
/usr/lib/mc/extfs.d/rpm
/usr/lib/mc/extfs.d/gitfs+
/usr/lib/mc/extfs.d/patchsetfs
/usr/lib/mc/extfs.d/uarj
/usr/lib/mc/extfs.d/u7z
/usr/lib/mc/extfs.d/s3+
/usr/lib/mc/extfs.d/README.extfs
/usr/lib/mc/extfs.d/uace
/usr/lib/mc/extfs.d/trpm
/usr/lib/mc/cons.saver
/usr/lib/mc/mc.sh
/usr/lib/mc/mc-wrapper.sh
/usr/lib/mc/mc.csh
/usr/lib/mc/ext.d
/usr/lib/mc/ext.d/text.sh
/usr/lib/mc/ext.d/video.sh
/usr/lib/mc/ext.d/image.sh
/usr/lib/mc/ext.d/archive.sh
/usr/lib/mc/ext.d/package.sh
/usr/lib/mc/ext.d/sound.sh
/usr/lib/mc/ext.d/web.sh
/usr/lib/mc/ext.d/misc.sh
/usr/lib/mc/ext.d/doc.sh
/usr/lib/mc/mc-wrapper.csh
/usr/lib/mc/fish
/usr/lib/mc/fish/ls
/usr/lib/mc/fish/hardlink
/usr/lib/mc/fish/unlink
/usr/lib/mc/fish/mkdir
/usr/lib/mc/fish/append
/usr/lib/mc/fish/README.fish
/usr/lib/mc/fish/send
/usr/lib/mc/fish/fexists
/usr/lib/mc/fish/ln
/usr/lib/mc/fish/rmdir
/usr/lib/mc/fish/utime
/usr/lib/mc/fish/get
/usr/lib/mc/fish/chmod
/usr/lib/mc/fish/mv
/usr/lib/mc/fish/chown
/usr/lib/mc/fish/info
/etc
/etc/mc
/etc/mc/mc.emacs.keymap
/etc/mc/sfs.ini
/etc/mc/mc.default.keymap
/etc/mc/mc.keymap
/etc/mc/filehighlight.ini
/etc/mc/edit.indent.rc
/etc/mc/mcedit.menu
/etc/mc/mc.menu
/etc/mc/mc.ext
/etc/mc/mc.menu.sr
/usr/share/mc/bin/mc.sh
/usr/share/mc/bin/mc-wrapper.sh
/usr/share/mc/bin/mc.csh
/usr/share/mc/bin/mc-wrapper.csh
/usr/bin/mcdiff
/usr/bin/mcedit
/usr/bin/mcview
答案2
此外AB答案,另一种解决方案:
dpkg -L package-name
或者长格式:
dpkg --list-files package-name
man dpkg
-L, --listfiles package-name...
List files installed to your system from package-name.
因此,对于你的情况,请运行:
dpkg -L maven
和
dpkg -L ant