ls 手册页说:
List information about the FILEs (the current directory by
default). Sort entries alphabetically if none of -cftuvSUX nor --sort
is specified.
Run Code Online (Sandbox Code Playgroud)
和
-a, --all do not ignore entries starting with .
Run Code Online (Sandbox Code Playgroud)
和
-1 list one file per line.
Run Code Online (Sandbox Code Playgroud)
但
/bin/ls -a1
Run Code Online (Sandbox Code Playgroud)
按文件名的字母顺序列出条目并带有任何前导 .删除,这不是按字母顺序排列的。
该sort命令执行相同的操作。
有什么方法可以ls正常工作(.首先使用文件 - 这也不是字母顺序)?