Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
1  
Possible duplicate of What does the l command do? (my answer there 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 3 at 12:13
Out of interest is this 'cheat sheet' going to be/is published ? – pl1nk Feb 7 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 at 17:59

2 Answers

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

share|improve this answer
up vote 2 down vote accepted

I found the answer while looking at the -i flag in http://freebsd.org/cgi/man.cgi?query=ls.

share|improve this answer
1  
I don't see how "-i For each file, print the file's file serial number (inode number)." helps you out in getting the meaning of the indicators with ls -F. – gertvdijk Feb 4 at 11:10
@gertvdijk I was actually meaning to suggest the OP give the answer.(I should've made that clearer, as I was pinging you.) But thanks for contributing an excellent answer! – Eliah Kagan Feb 4 at 11:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.