<分区>
我目前正在研究 Bash shell 并遇到命令 ls -F
。我知道它的 ls 功能是将指示器附加到项目列表中,以便区分不同的文件类型。我知道 /
附加到目录, *
附加到可执行文件。但是我已经查看了 ls 命令的手册页,但找不到有关指标 =>@| 的任何信息。
谁能告诉我他们代表什么?如果能在需要时告诉我在哪里可以找到这类信息就更好了。
<分区>
我目前正在研究 Bash shell 并遇到命令 ls -F
。我知道它的 ls 功能是将指示器附加到项目列表中,以便区分不同的文件类型。我知道 /
附加到目录, *
附加到可执行文件。但是我已经查看了 ls 命令的手册页,但找不到有关指标 =>@| 的任何信息。
谁能告诉我他们代表什么?如果能在需要时告诉我在哪里可以找到这类信息就更好了。
最佳答案
尝试 info ls
,在“列出的信息”下:
‘-F’
‘--classify’
‘--indicator-style=classify’
Append a character to each file name indicating the file type.
Also, for regular files that are executable, append ‘*’. The file
type indicators are ‘/’ for directories, ‘@’ for symbolic links,
‘|’ for FIFOs, ‘=’ for sockets, ‘>’ for doors, and nothing for
regular files. Do not follow symbolic links listed on the command
line unless the ‘--dereference-command-line’ (‘-H’),
‘--dereference’ (‘-L’), or
‘--dereference-command-line-symlink-to-dir’ options are specified.
关于linux - 使用 'ls -F'时不同指标的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44380114/