Operator Meaning
-r $file True for a readable file.
-w $file True for a writeable file.
-x $file True for an executable file.
-o $file True for owned by effective uid.
-e $file True if exists.
-z $file True for zero size.
-s $file True if $file has nonzero size. Returns the size of the file in bytes.
-f $file True for a plain file.
-d $file True for a directory file.
-l $file True for a symbolic link.
-p $file True for a named pipe or FIFO.
-S $file True for a socket.
-b $file True for a block special file.
-c $file True for a character special file.
-u $file True for a setuid bit set.
-g $file True for a setgid bit set.
-k $file True for a sticky bit set.
-t $file True if filehandle is opened to a tty.
-T $file True for a text file.
-B $file True for a binary file.
-M $file Age in days since modified.
-A $file Age in days since last accessed.
-C $file Age in days since the inode changed.