Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我被要求用一个命令列出当前工作目录中最后 5 个隐藏目录的内容。我认为这样的事情可以完成这项工作:
ls -a -1 | grep "^\." | tail -n 5 | ls
但它只列出了最后五个目录的名称.. 我如何列出内容?
ls -a -1 | grep "^\." | tail -n 5 | xargs ls