[- File] |
True ifFileExists. |
[-B File] |
True ifFileExists and is a block-special file. |
[-C File] |
True ifFileExists and is a character-special file. |
[-D File] |
True ifFileExists and is a directory. |
[-E File] |
True ifFileExists. |
[-F File] |
True ifFileExists and is a regular file. |
[-G File] |
True ifFileExists and its SGID bit is set. |
[-H File] |
True ifFileExists and is a symbolic link. |
[-K File] |
True ifFileExists and Its Sticky Bit is set. |
[-P File] |
True ifFileExists and is a named pipe (FIFO ). |
[-R File] |
True ifFileExists and is readable. |
[-S File] |
True ifFileExists and has a size greater than zero. |
[-T FD] |
True if file descriptorFDIs open and refers to a terminal. |
[-U File] |
True ifFileExists and its SUID (Set User ID) bit is set. |
[-W File] |
True ifFileExists and is writable. |
[-X File] |
True ifFileExists and is executable. |
[-O File] |
True ifFileExists and is owned by the specified tive user ID. |
[-G File] |
True ifFileExists and is owned by the specified tive group ID. |
[-L File] |
True ifFileExists and is a symbolic link. |
[-N File] |
True ifFileExists and has been modified since it was last read. |
[-S File] |
True ifFileExists and is a socket. |
[File1 -NT File2] |
True ifFile1Has been changed more recentlyFile2, Or ifFile1Exists andFile2Does not. |
[File1 -Ot File2] |
True ifFile1Is olderFile2, Or isFile2Exists andFile1Does not. |
[File1 -Ef File2] |
True ifFile1AndFile2Refer to the same device and inode numbers. |
[-OOptionname] |
True if shell option "optionname" is enabled. |
[-ZString] |
True of the length if "string" is zero. |
[-NString] or [String] |
True if the length of "string" is non-zero. |
[String1 = string2] |
True if the strings are equal. "=" may be used instead of "=" for strict POSIX compliance. |
[String1! = String2] |
True if the strings are not equal. |
[String1 <string2] |
True if "string1" sorts before "string2" lexicographically in the current locale. |
[String1> string2] |
True if "string1" sorts after "string2" lexicographically in the current locale. |
[Arg1 op arg2] |
"Op" is one-EQ,-Ne,-Lt,-Le,-GTOr-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. |