Linux 基本工具(tree)
我们在查看系统所有进程的进程树可以使用 pstree
, 例如:
root@server:/etc/X11# pstree
systemd─┬─VBoxService─┬─{automount}
│ ├─{control}
│ ├─{cpuhotplug}
│ ├─{memballoon}
│ ├─{timesync}
│ ├─{vminfo}
│ └─{vmstats}
├─accounts-daemon─┬─{gdbus}
│ └─{gmain}
├─acpid
├─atd
├─cgmanager
├─cron
├─dbus-daemon
├─dhclient
├─dhcpd
├─dnsmasq───dnsmasq
├─3*[dynomite───2*[{dynomite}]]
├─epmd
├─in.tftpd
├─irqbalance
├─2*[iscsid]
......
而对于某个目录, 我们想知道目录树下的大致结构以及目录下的文件布局信息, 我们可以使用 tree
命令, tree
非系统核心包, 需要手动安装: