Next: , Previous: Size, Up: Finding Files



2.5 Type

— Test: -type c

True if the file is of type c:

b
block (buffered) special
c
character (unbuffered) special
d
directory
p
named pipe (FIFO)
f
regular file
l
symbolic link
s
socket
D
door (Solaris)

— Test: -xtype c

The same as -type unless the file is a symbolic link. For symbolic links: if -follow has not been given, true if the file is a link to a file of type c; if -follow has been given, true if c is l. In other words, for symbolic links, -xtype checks the type of the file that -type does not check. See Symbolic Links, for more information on -follow.