您正在查找条件表达式。假设您使用的是bash,您可以查看以下部分
6.4 Bash Conditional Expressions
Bash参考手册。
-a file
True if file exists.
-b file
True if file exists and is a block special file.
-c file
True if file exists and is a character special file.
-d file
True if file exists and is a directory.
-e file
True if file exists.
-f file
True if file exists and is a regular file.
-g file
True if file exists and its set-group-id bit is set.
-h file
True if file exists and is a symbolic link.
-k file
True if file exists and its "sticky" bit is set.
[...]
完整列表请参阅上述文件。