我正在创建 shell 命令的“备忘单”。我目前正在研究该ls
命令及其标志。对于-F
标志,我知道大多数附加指示符的含义,但对于;=
我|
找不到任何信息。
有人能告诉我这些命令是什么意思吗?
答案1
我相信你说的是指标由 提供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)
为了了解这些指标的含义,我们必须深入研究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.
以上内容摘自“常规输出格式”部分。使用 可直接前往该处info coreutils 'General output formatting'
。