True if the file is of type c:
block (buffered) special
character (unbuffered) special
named pipe (FIFO)
symbolic link; if ‘-L’ is in effect, this is true only for broken symbolic links. If you want to search for symbolic links when ‘-L’ is in effect, use ‘-xtype’ instead of ‘-type’.
As a GNU extension, multiple file types can be provided as a combined list separated by comma ‘,’. For example, ‘-type f,d,l’ is logically interpreted as ‘( -type f -o -type d -o -type l )’.
This test behaves the same as ‘-type’ unless the file is a symbolic link. If the file is a symbolic link, the result is as follows (in the table below, ‘X’ should be understood to represent any letter except ‘l’):
True if the symbolic link is broken
True if the (ultimate) target file is of type ‘X’.
False unless the symbolic link is broken
In other words, for symbolic links, ‘-xtype’ checks the type of the file that ‘-type’ does not check.
The ‘-H’ option also affects the behaviour of ‘-xtype’. When ‘-H’ is in effect, ‘-xtype’ behaves as if ‘-L’ had been specified when examining files listed on the command line, and as if ‘-P’ had been specified otherwise. If neither ‘-H’ nor ‘-L’ was specified, ‘-xtype’ behaves as if ‘-P’ had been specified.
See Symbolic Links, for more information on ‘-follow’ and ‘-L’.