test (arguments) Flashcards
True if FILE exists.
[ -a FILE ]
True if FILE exists and is a block-special file.
[ -b FILE ]
True if FILE exists and is a character-special file.
[ -c FILE ]
True if FILE exists and is a directory.
[ -d FILE ]
True if FILE exists.
[ -e FILE ]
True if FILE exists and is a regular file.
[ -f FILE ]
True if FILE exists and its SGID bit is set.
[ -g FILE ]
True if FILE exists and is a symbolic link.
[ -h FILE ]
True if FILE exists and its sticky bit is set.
[ -k FILE ]
True if FILE exists and is a named pipe (FIFO).
[ -p FILE ]
True if FILE exists and is readable.
[ -r FILE ]
True if FILE exists and has a size greater than zero.
[ -s FILE ]
True if file descriptor FD is open and refers to a terminal.
[ -t FD ]
True if FILE exists and its SUID (set user ID) bit is set.
[ -u FILE ]
True if FILE exists and is writable.
[ -w FILE ]