简体   繁体   English

显示当前目录而不是父目录中的所有隐藏文件

[英]display all hidden files in the current directory not in the parent directory

I need to display all hidden files in the current directory but I dont want to see hidden files in the parent directory.我需要显示当前目录中的所有隐藏文件,但我不想在父目录中看到隐藏文件。 I used echo command for it but so far I cant get rid of hidden files in parent directory.我使用了 echo 命令,但到目前为止我无法摆脱父目录中的隐藏文件。

My code is: echo $(ls.* --ignore='*')我的代码是: echo $(ls.* --ignore='*')

The output is: output 是:

.bash_history 
.bash_logout 
.bashrc .profile 
.: 
..: 
.cache: 
.config: 
.gnupg: 
.loc                           
al:

This lists only hidden files:这仅列出隐藏文件:

ls -d .?* 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM