我使用find . -type d
来列出文件夹中的所有目录。现在说我在我的home
文件夹中。使用grep来过滤目录
之类的东西,这是我的结果:
.
./.cache
./.config/junk
./Documents
./Downloads
./.local/share/junk1
./.local/share/junk2
./.mozilla/junk1
./Pictures
./Videos
然而,我不希望这些隐藏的文件出现在列表中。做find . -type d | grep -v ./.
不起作用。在这种情况下,它仅显示.
作为输出。
任何想法如何过滤掉这些隐藏的文件夹?
'.'匹配任何字符,使用'/ \。' – Kevin 2013-05-03 16:37:54