我需要显示当前目录中的所有隐藏文件,但我不想在父目录中看到隐藏文件。我为此使用了echo命令,但到目前为止,我无法摆脱父目录中的隐藏文件。
我的代码是:
echo $(ls .* --ignore='*')
输出为:
.bash_history
.bash_logout
.bashrc .profile
.:
..:
.cache:
.config:
.gnupg:
.loc
al:
答案 0 :(得分:0)
这仅列出隐藏文件:
ls -d .?*