4

According to this website:

http://ss64.com/bash/ls.html

The first letter indicates the file type: f means file and d means directory. But in my case I've an l. What's the meaning of this l? In my case, the file is actually a directory too.

Also some entries do not have any file type, i.e. they have a leading dash -. Does this mean that the OS does not recognise the file type?

7

A symbolic link. Means it's a pointer to another file.

You can see the full list of file types here.

4

a leading dash '-' means its a file.

a lead 'd' means its a directory

a leading 'l' means its a link to another file.

The first character identifies the file type:

- : Regular file

b : Block special file

c : Character special file

d : Directory

l : Symbolic link

n : Network file

p : FIFO

s : Socket

  • So why having to symbols (i.e. - and f) to indicate file? There must be a distinction... – nbro Mar 1 '16 at 17:56
  • 2
    - is used to indicate a file, the ss64 page is wrongly referring to f which is not used, at least under Unix and Linux. – jlliagre Mar 1 '16 at 18:00
  • I agree with @jlliagre .Its wrongly written on the page. – Pacifist Mar 1 '16 at 18:05

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