www.delorie.com/gnu/docs/sh-utils/sh-utils_20.html   search  
 
Buy GNU books!


GNU shell utilities

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.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.

`-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 opened on a terminal. If fd is omitted, it defaults to 1 (standard output).


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003