|
如果使用 tree 列出的是一个很大的树状图,你可以把它跟 less 组合使用:
$ tree | less
再一次,tree 有很多其他的选项可以使用,,你可以把他们组合在一起发挥更强大的作用。man 手册页有所有这些选项:
$ man tree
find
那么如果不知道文件在哪里呢?就让我们来找到它们吧!
要是你的系统中没有 find,你可以使用 DNF 安装它:
$ sudo dnf install findutils
运行 find 时如果没有添加任何选项或者参数,它将会递归列出当前目录下的所有文件和目录。
$ find../Documents./Documents/secret./Documents/secret/christmas-presents.txt./Documents/notes.txt./Documents/work./Documents/work/status-reports.txt./Documents/work/project-abc./Documents/work/project-abc/README.md./Documents/work/project-abc/do-things.sh./Documents/work/project-abc/project-notes.txt./.bash_logout./.bashrc./Videos./.bash_profile./.vimrc./Pictures./Pictures/trees.png./Pictures/wallpaper.png./notes.txt./Music
但是 find 真正强大的是你可以使用文件名进行搜索:
$ find -name do-things.sh./Documents/work/project-abc/do-things.sh
或者仅仅是名字的一部分 —— 像是文件后缀。我们来找一下所有的 .txt 文件:
$ find -name "*.txt"./Documents/secret/christmas-presents.txt./Documents/notes.txt./Documents/work/status-reports.txt./Documents/work/project-abc/project-notes.txt./notes.txt
(编辑:安卓应用网_ASP源码网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|