23

Looking at the man pages for plain old ls I see there's a flag for -F

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

I've used it a few times, but all I see it adds a slash / to folders which is the same as ls -p

What does this mean for the others *=>@|?

I'm running Ubuntu 14.04 with GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)

Jeff Puckett
  • 37,464
  • 17
  • 118
  • 167
  • 1
    Same here. :) As the some other ls manpage gave the explanation to this as shown below, I suspect the Ubuntu doesn't encourage using this option, or it is high time they update the manpage. – sjsam Jul 30 '16 at 03:49
  • 3
    Good question, the man page is inadequate. That doesn't make it a programming question though. – doug65536 Jul 30 '16 at 19:29
  • 1
    `info ls` give me explaination, just show this part like `info ls |grep -E '^.{0,1}-F' -A 11` – user2204107 Dec 02 '21 at 10:15

1 Answers1

25

Each of the symbols is for a specific type of file. If you haven't seen them, it's probably because you don't have any files of that type. The man page for ls should say what each of them means. But, in case you can't read yours for some reason, here's what mine says:

     -F      Display a slash (`/') immediately after each pathname that is a
         directory, an asterisk (`*') after each that is executable, an at
         sign (`@') after each symbolic link, a percent sign (`%') after
         each whiteout, an equal sign (`=') after each socket, and a
         vertical bar (`|') after each that is a FIFO.

Mine seems to use some characters yours doesn't and not use some that yours does. So, to resolve the others you need to read the man page that refers to your version.

MAP
  • 812
  • 6
  • 10
  • 13
    interesting, thanks! my man pages are exactly as pasted above (and on the linked page) – Jeff Puckett Jul 30 '16 at 03:47
  • 1
    Then I'd complain, if I were you. – MAP Jul 30 '16 at 03:50
  • @MAP Running Ubuntu here and getting the same short man pages that Jeff gets. Don't think complaining would resolve anything though :) I've had bugs open on launchpad for months that nobody is even looking at. Getting the feeling that they're becoming more and more like Mickey$oft where you have to pay big bucks to get support. – user281681 Jul 27 '22 at 20:35
  • 1
    Anymore on ubuntu `man ` is a short form, the long form information is available on `info `. On ubuntu 22.04.1 LTS (for example) the details of the `-F` classify characters are available if you use `info ls`. – Joakim Erdfelt Nov 16 '22 at 14:27