我注意到如果我在目录上运行 ls -F ,某些条目后面会有 * 或 @ 。
spuder@ubuntu:~$ ls -F /sbin
acpi_available* getpcaps* lvmconf* ntfscp* start-stop-daemon*
agetty* getty* lvmdiskscan@ ntfslabel* status@
alsa* halt@ lvmdump* ntfsresize* stop@
alsactl* hdparm* lvmsadc@
spuder@ubuntu:~$ ls -F ~
daq-0.6.1/ examples.desktop noname-cache.lib snort-2.9.1/ Templates/
Desktop/ jpgraph-1.27.1/ noname.sch snortfiles/ Ubuntu One/
Documents/
Run Code Online (Sandbox Code Playgroud)
根据 ls 手册页
spuder@ubuntu:~$ man ls
...
-F, --classify
append indicator (one of */=>@|) to entries
...
Run Code Online (Sandbox Code Playgroud)
我猜这@
意味着符号链接,
这些其他指标是什么意思 ( */=>@|
) ?
只是添加我如何找到此信息。如底部所示man ls
:
\n\n完整文档位于:https://www.gnu.org/software/coreutils/ls \ 也不能通过以下方式在本地获取: info \'(coreutils) ls incalling\'
\n
接下来,我们看到
\n\n\n\xe2\x80\x98-F\xe2\x80\x99 \xe2\x80\x98--classify\xe2\x80\x99 \xe2\x80\x98--indicator-style=classify\xe2\x80\x99 附加每个文件名的\n字符指示文件类型。另外,对于可执行的常规文件,请附加 \xe2\x80\x98*\xe2\x80\x99。文件类型指示符为\n目录的\xe2\x80\x98/\xe2\x80\x99、符号链接的\xe2\x80\x98@\xe2\x80\x99、\xe2\x80\x98|\xe2\x80 \x99 用于 FIFO,\xe2\x80\x98=\xe2\x80\x99 用于套接字,\n\xe2\x80\x98>\xe2\x80\x99 用于门,对于常规文件没有任何内容。不要遵循命令行上列出的\n符号链接,除非 --dereference-command-line\n(-H)、--dereference (-L) 或 --dereference-command-line-symlink-to-dir\未指定任何选项。
\n
在https://www.gnu.org/software/coreutils/manual/coreutils.html#General-output-formatting
\n