如果 FILE 存在 and has been mod 如果ied since it was last read 则为真。
[ -SFILE ]
如果 FILE 存在且是一个套接字则为真。
[ FILE1-ntFILE2 ]
如果 FILE1 has been changed more recently than FILE2 , or 如果 FILE1 exists and FILE2 does not 则为真。
[ FILE1-otFILE2 ]
如果 FILE1 比 FILE2 要老, 或者 FILE2 存在且 FILE1 不存在则为真。
[ FILE1-efFILE2 ]
如果 FILE1 和 FILE2 指向相同的设备和节点号则为真。
[ -o OPTIONNAME ]
如果 shell 选项 “OPTIONNAME” 开启则为真。
[ -z STRING ]
“STRING” 的长度为零则为真。
[ -n STRING ] or [ STRING ]
“STRING” 的长度为非零 non-zero 则为真。
[ STRING1 == STRING2 ]
如果2 个字符串 相同。 “=” may be used instead of “==” for strict POSIX compliance 则为真。
[ STRING1 != STRING2 ]
如果字符串不相 等则为真。
[ STRING1 < STRING2 ]
如果 “STRING1” sorts before “STRING2” lexicographically in the current locale 则为真。
[ STRING1 > STRING2 ]
如果 “STRING1” sorts after “STRING2” lexicographically in the current locale 则为真。
[ ARG1 OP ARG2 ]
“OP” is one of -eq , -ne , -lt , -le , -gt or -ge . These arithmetic binary operators return true if “ARG1” is equal to, not equal to, less than, less than or equal to, greater than, or greater than or equal to “ARG2”, respectively. “ARG1” and “ARG2” are integers.