首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >apt-缓存显示未来命令

apt-缓存显示未来命令
EN

Unix & Linux用户
提问于 2015-09-17 19:31:08
回答 2查看 60关注 0票数 1

一旦通过apt-get安装了软件包,有什么方法可以找到哪些命令可用?

假设我想运行apt-get -y net-tools

代码语言:javascript
复制
Host> apt-cache show net-tools
Package: net-tools
Version: 1.60-24.2
Installed-Size: 916
Maintainer: net-tools Team <pkg-net-tools-maintainers@lists.alioth.debian.org>
Architecture: amd64
Replaces: ja-trans (<= 0.8-2), netbase (<< 4.00)
Depends: libc6 (>= 2.4)
Conflicts: ja-trans (<= 0.8-2)
Description-en: The NET-3 networking toolkit
 This package includes the important tools for controlling the network
 subsystem of the Linux kernel.  This includes arp, ifconfig, netstat,
 rarp, nameif and route.  Additionally, this package contains utilities
 relating to particular network hardware types (plipconfig, slattach,
 mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr).
 .
 In the upstream package 'hostname' and friends are included. Those are
 not installed by this package, since there is a special "hostname*.deb".
Homepage: http://net-tools.berlios.de/
Description-md5: 003fb6a11fdb767fff574478588a3ca8
Tag: admin::configuring, implemented-in::c, interface::commandline,
 network::configuration, network::routing, network::vpn, protocol::ipv6,
 role::program, scope::utility, use::routing
Section: net
Priority: important
Filename: pool/main/n/net-tools/net-tools_1.60-24.2_amd64.deb
Size: 346084
MD5sum: 7ef2fa3c53ba45adf9b3c369ef5ba458
SHA1: f8fa10c12f3309c69ed2a010e4824b6c41957c20
SHA256: a27cb96bc41b9349f6ab0a102cf8ed9210a129b2a67ca2a108675235d3600aaa

Host>

apt-cache show net-tools是否已经公开了所有的内容(arp,ifconfig,netstat,rarp,nameif,route,plipconfig,sl附件,mii-tool,ip隧道,ipmaddr)?

EN

回答 2

Unix & Linux用户

回答已采纳

发布于 2015-09-17 19:47:21

apt-cache没有办法做到这一点。然而,apt-file会按你的要求去做。手册:http://manpages.ubuntu.com/manpages/vivid/en/man1/apt-file.1.html

您可以运行apt-file list net-tools来列出由net安装的文件,即使没有安装net.

apt-file确实对此信息使用了缓存,您需要使用apt-file update定期更新这些信息。

票数 2
EN

Unix & Linux用户

发布于 2015-09-17 19:47:55

即使还没有下载,也可以使用apt-file列出包中的所有文件。然后通过grep过滤它。

代码语言:javascript
复制
$ apt-file list net-tools | grep bin
net-tools: /bin/netstat
net-tools: /sbin/ifconfig
net-tools: /sbin/ipmaddr
net-tools: /sbin/iptunnel
net-tools: /sbin/mii-tool
net-tools: /sbin/nameif
net-tools: /sbin/plipconfig
net-tools: /sbin/rarp
net-tools: /sbin/route
net-tools: /sbin/slattach
net-tools: /usr/sbin/arp
票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/230373

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档