| -d file | The specified file exists and is a directory. |
| -e file | The specified file exists. |
| -r file | The specified file exists and is readable. |
| -s file | The specified file exists and has non-zero size. |
| -w file | The specified file exists and is writable. |
| -x file | The specified file exists and is executable. |
| -L file | The specified file exists and is a symbolic link. |
| f1 -nt f2 | File f1 is newer than file f2. |
| f1 -ot f2 | File f1 is older than file f2. |
| -n s1 | String s1 has nonzero length. |
| -z s1 | String s1 has zero length. |
| s1 = s2 | String s1 is the same as string s2. |
| s1 != s2 | String s1 is not the same as string s2. |
| n1 -eq n2 | Integer n1 is equal to integer n2. |
| n1 -ge n2 | Integer n1 is greater than or equal to integer n2. |
| n1 -gt n2 | Integer n1 is greater than integer n2. |
| n1 -le n2 | Integer n1 is less than integer n2. |
| n1 -lt n2 | Integer n1 is less than or equal to integer n2. |
| n1 -ne n2 | Integer n1 is not equal to integer n2. |
| ! | The not operator, which reverses the value of the following condition. |
| -a | The and operator, which joins two conditions. Both conditions must be true for the overall result to be true. |
| -o | The or operator, which joins two conditions. If either condition is true, the overall result is true. |
| \( ... \) | You can group expressions within the test command by enclosing them within \( and \). |