Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
ksh(1) OSS Shell and Utilities Reference Manual
-g file TRUE, if file exists and has its setgid bit set.
-G file TRUE, if file exists and its group ID matches the effective group ID of this process.
-k file TRUE, if file exists and has its sticky bit set.
-L file TRUE, if file exists and is a symbolic link.
-n string TRUE, if length of string is nonzero.
-o option
TRUE, if option named option is on.
-O file TRUE, if file exists and is owned by the effective user ID of this process.
-p file TRUE, if file exists and is a FIFO special file or a pipe.
-r file TRUE, if file exists and is readable by current process.
-s file TRUE, if file exists and has size greater than 0 (zero).
-S file TRUE, if file exists and is a socket.
-t file_des
TRUE, if file descriptor number file_des is open and associated with a terminal device.
-u file TRUE, if file exists and has its setuid bit set.
-w file TRUE, if file exists and is writable by current process.
-x file TRUE, if file exists and is executable by current process. If file exists and is a direc-
tory, then the current process has permission to search in the directory.
-z string TRUE, if length of string is 0 (zero).
file1 -nt file2
TRUE, if file1 exists and is newer than file2.
file1 -ot file2
TRUE, if file1 exists and is older than file2.
file1 -ef file2
TRUE, if file1 and file2 exist and refer to the same file.
string = pattern
TRUE, if string matches pattern.
string != pattern
TRUE, if string does not match pattern.
string1 < string2
TRUE, if string1 collates before string2.
string1 > string2
TRUE, if string1 collates after string2.
expression1 -eq expression2
TRUE, if expression1 is equal to expression2.
5−18 Hewlett-Packard Company 527188-003