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.
快速示例 - 我想列出所有~/.*目录的内容,所以:
~/.*
ls -la ~/.*
但是它还列出了所有当前目录.和上层目录..
.
..
我怎样才能排除.和..?
从 ls 手册页:
-A, --almost-all do not list implied . and ..
所以它将是:
ls -lA ~/.*
如果您更喜欢使用正则表达式:
ls -la ~/.[^.]*