=、*和|之类的符号是什么?在“ls -F”的输出中是什么意思?

Dan*_*676 17 command-line files ls

我正在创建一个 shell 命令的“备忘单”。我目前正在研究ls命令及其标志。对于-F标志,我知道大多数附加指标的含义,但用于;=|我无法找到任何信息。

有人可以告诉我这些命令是什么意思。

ger*_*ijk 20

我相信你在谈论指标的提出ls -F。从联机帮助页ls

-F, --classify
   append indicator (one of */=>@|) to entries

[...]

--indicator-style=WORD
   append indicator with style WORD to entry names: none (default), slash (-p),
   file-type (--file-type), classify (-F)
Run Code Online (Sandbox Code Playgroud)

要大致了解这些指标的含义,我们必须按照手册info页底部的建议 ( info coreutils 'ls invocation')深入了解该页面:

`-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.
Run Code Online (Sandbox Code Playgroud)

以上是摘自“常规输出格式”部分。直接使用info coreutils 'General output formatting'.

TL; 博士