The filetypes reported by ls
depends on the capabilities of the underlying filesystem, the operating system, and on the specific implementation of ls
.
The l
type is the common symbolic link file type.
This is (ought to be) documented in your ls
manual.
On OpenBSD (macOS and AIX has the same list, but in another order):
- regular file
b block special file
c character special file
d directory
l symbolic link
p FIFO
s socket link
On NetBSD (FreeBSD has the same without a
and A
):
- Regular file.
a Archive state 1.
A Archive state 2.
b Block special file.
c Character special file.
d Directory.
l Symbolic link.
p FIFO.
s Socket link.
w Whiteout.
From info ls
(i.e. the GNU ls
manual):
‘-’
regular file
‘b’
block special file
‘c’
character special file
‘C’
high performance (“contiguous data”) file
‘d’
directory
‘D’
door (Solaris 2.5 and up)
‘l’
symbolic link
‘M’
off-line (“migrated”) file (Cray DMF)
‘n’
network special file (HP-UX)
‘p’
FIFO (named pipe)
‘P’
port (Solaris 10 and up)
‘s’
socket
‘?’
some other file type
On Solaris 11:
d
The entry is a directory.
D
The entry is a door.
l
The entry is a symbolic link.
b
The entry is a block special file.
c
The entry is a character special file.
p
The entry is a FIFO (or “named pipe”) special file.
P
The entry is an event port.
s
The entry is an AF_UNIX address family socket.
-
The entry is an ordinary file.