19

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.

muru
  • 193,181
  • 53
  • 473
  • 722
Dan1676
  • 345
  • 2
  • 8
  • 1
    Possible duplicate of [What does the l command do?](http://askubuntu.com/questions/191746/what-does-the-l-command-do) ([my answer there](http://askubuntu.com/a/246208/22949) explains what all those symbols mean). On the other hand, that's considerably more general, so if you answer this as @Aditya suggests, it probably doesn't need to be closed as a duplicate. – Eliah Kagan Feb 03 '13 at 12:13
  • Out of interest is this 'cheat sheet' going to be/is published ? – pl1nk Feb 07 '13 at 11:52
  • @pl1nk no, it was for Uni. If you need help with commands view the site I have in my answer – Dan1676 Feb 11 '13 at 17:59
  • See also: [Unix & Linux: What do the symbols displayed by ls -F mean?](https://unix.stackexchange.com/a/82358/114401) – Gabriel Staples Nov 11 '21 at 19:58

1 Answers1

22

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

gertvdijk
  • 67,007
  • 33
  • 188
  • 283