(coreutils.info)File type tests


Next: Access permission tests Up: test invocation
Enter node , (file) or (file)node

16.3.1 File type tests
----------------------

These options test for particular types of files.  (Everything’s a file,
but not all files are the same!)

‘-b FILE’
     True if FILE exists and is a block special device.

‘-c FILE’
     True if FILE exists and is a character special device.

‘-d FILE’
     True if FILE exists and is a directory.

‘-f FILE’
     True if FILE exists and is a regular file.

‘-h FILE’
‘-L FILE’
     True if FILE exists and is a symbolic link.  Unlike all other
     file-related tests, this test does not dereference FILE if it is a
     symbolic link.

‘-p FILE’
     True if FILE exists and is a named pipe.

‘-S FILE’
     True if FILE exists and is a socket.

‘-t FD’
     True if FD is a file descriptor that is associated with a terminal.


automatically generated by info2www version 1.2.2.9