File Test Operators

Operator Meaning
-d directory
-e exits
-f regular file
-l symbolic link
-r readable
-s non-zero size (returns size)
-u setuid bit set
-w writable
-x executable
-B binary file
-T text file

Example: if( -e $file_name){ ...};