Answers:
让shell列出点文件,并告诉ls不要浏览目录:
ls -d .*
              grep基于方法的方法不同,这具有允许多列列出的优点。
                    ls -d .* | grep -v '^d'或(仅zsh)print -lr .*(.)
                    从记录来看,这似乎对我不起作用,因为它ls -a打印了两个(有时会更多列)。我建议使用该-1选项,以确保每个文件都在自己的行中。像这样:
alias hidden='ls -a1 | grep "^\."'
              ls -a | cat它仍然在2列上输出。我应该提到我使用的是Solaris,而不是GNU ls。也许就是这个原因。在所有情况下,您的-1解决方案都可以完美运行,并且比我骇人的解决方法优雅得多。我正在更新我的答案。
                    # add it to ~/.bashrc
    hidden() {  # lists hidden files and directories
        find . -maxdepth 1 -name '.?*' -exec ls --color -d {} \;
        }
    hiddenfiles() { # lists hidden files
        find . -maxdepth 1 -type f -name '.?*' -exec ls --color -d {} \;
        }
    hiddendirs() { # lists directories
        find . -maxdepth 1 -type d -name '.?*' -exec ls --color -d {} \;
        }
              您ls支持-A吗?来自man ls:
    -a, --all
          do not ignore entries starting with .
   -A, --almost-all
          do not list implied . and ..
$ ls --version
ls (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  
Written by Richard M. Stallman and David MacKenzie.
              only隐藏的文件。
                    ls -A -1 -d -F .* | egrep -v '/$'
                    只需简单地键入以下命令,不要与上面解释的内容混淆。
ls -A -1 -d -F .* | egrep -v '/$'
              ls标志和egrep命令如何以及为什么回答该问题。
                    ls -lart | sed -n "/ \.[A-Za-z0-9][A-Za-z0-9]*/p"
              
'ls -a | grep '"'"'^\.'"'"'它看起来很糟糕(在这个例子中,这是完全没有必要的,因为您可以换成双对中的双引号),但是在极少数情况下,它很有用。您可能还需要-C标志(强制多列输出)。看到这张图片imgur.com/a/VIVFP