Ubuntu – What do the symbols like =, * and | in the output of “ls -F” mean

command linefilesls

I am working on creating a 'cheat sheet' of shell commands. I am currently researching the ls command and its flags. For the -F flag I know what the majority of the appended indicators mean but for; = and | I can't find any information.

Could someone please tell me what these commands mean.

Best Answer

I believe you're talking about indicators presented by ls -F. From the manpage of 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)

To get an overview of the meaning of these indicators, we have to dive into the info page as suggested at the bottom of the manpage (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.

Above is an excerpt taken from the 'General output formatting' section. Go there directly using info coreutils 'General output formatting'.

TL;DR

Related Question