如何使* tree *列出隐藏文件?


23

我正在使用此程序包tree来列出给定目录中的子目录和文件。除未列出隐藏文件外,它工作正常。

当我tree在文件夹中运行时,它会返回

├── Zodiac (2007)
│   └── Zodiac (2007).mkv
├── Zombieland (2009) H
│   └── Zombieland (2009) H.mkv
└── Zootopia (2016)
    ├── Zootopia (2016).mkv
    └── Zootopia (2016).srt

但是它应该返回.folder.png在每个文件夹中命名的隐藏文件。

我可以实现吗?

Answers:


35

使用 tree -a

$ man tree
-a     All files are printed.  By default tree does not print hidden files 
(those beginning with a dot `.').  
In no event does tree print the file system constructs 
`.' (current directory) and `..' (previous directory).

我读了手册页,也许我以某种方式跳过了它。(在12分钟内接受答复)
Sumeet Deshmukh

4
@SumeetDeshmukh我发现手册页经常使我入睡,直到我听不懂:)
Zanna

@SumeetDeshmukh man tree在阅读您的问题后我做的第一件事
Yoginee Pingale '17

1
幸运的是,您可以通过键入内容/和搜索词来搜索手册页
–groovplex

1
@grooveplex我从来不知道-你学习,通过打字man less

3

此外gvfs东东都安装在许多系统中,你可以使用它们太:

gvfs-tree -h
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.