Table of -x file test operators and actions
| Test Symbol | Operation |
| -x | File or directory is
executable |
| -o | File or directory is
owned by user |
| -R | File or directory is
readable by real user, not effective user (differs from -r for setuid
programs) |
| -W | File or directory is
writable by real user, not effective user (differs from -w for setuid
programs) |
| -X | File or directory is
executable by real user, not effective user (differs from -x for
setuid programs) |
| -O | File or directory is
owned by real user, not effective user (differs from -o for setuid
programs) |
| -e | File or directory
exists |
| -z | File or directory
exists and has zero size |
| -s | File or directory
exists and has nonzero size (note: directories are never
empty). |
| -f | Entry is a plain
file. |
| -d | Entry is a
directory. |
| -l | Entry is a
symlink. |
| -S | Entry is a
socket. |
| -p | Entry is a named
pipe. |
| -b | Entry is a block
special file (a device like a mountable disk). |
| -c | Entry is a character
special file (a device like an I/O device). |
| -u | File or directory is
setuid |
| -g | File or directory is
setgid |
| -k | File or directory has
the sticky bit set. |
| -t | The isatty() handle on
the file is true. |
| -T | The file contains
"text" |
| -B | The file contains
"binary" |
| -M | Returns modification
age in days |
| -A | Returns access age in
days |
| -C | Returns inode
modification age in days |