-a filepath | file exists. all files type |
-b filepath | file exists and is a block special file. |
-c filepath | file exists and is a character special file. |
-d filepath | file exists and is a directory. |
-e filepath | file exists (等同于 -a). |
-f? filepath | file exists and is a regular file. |
-g filepath | file exists and has its setgid(2) bit set. |
-G filepath | file exists and has the same group ID as this process. |
-k filepath | file exists and has its sticky bit set. |
-L filepath | file exists and is a symbolic link. |
-n filepath | string length is not zero. |
-o filepath | Named option is set on. |
-O filepath | file exists and is owned by the user ID of this process. |
-p filepath | file exists and is a first in, first out (FIFO) special file or named pipe. |
-r filepath | file exists and is readable by the current process. |
-s filepath | file exists and has a size greater than zero. |
-S filepath | file exists and is a socket. |
-t filepath | file descriptor number fildes is open and associated with a terminal device. |
-u filepath | file exists and has its setuid(2) bit set. |
-w filepath | file exists and is writable by the current process. |
-x filepath | file exists and is executable by the current process. |