16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

test<br />

Description<br />

test checks for various properties of files, strings, and integers. It does not produce<br />

any output other than error messages, but returns the result of the test as the exit<br />

status.<br />

The command line is a Boolean expression. The simplest expression is a string that<br />

is true if the string is nonempty (that is, has nonzero length). More complex<br />

expressions are composed of operators and operands, each of which is a separate<br />

argument (that is, surrounded by white space). The operators imply the number and<br />

type of their operands. The operators taking a file operand evaluate as false<br />

(without error) if the file does not exist.<br />

The following is a list of recognized operands:<br />

–Aa file<br />

True if file has an extended access ACL entry.<br />

–Ad file<br />

True if file is a directory with a directory default ACL.<br />

–Af file<br />

True if file is a directory with a file default ACL.<br />

–b file True if file is a block special file (block special files are not supported)<br />

–B file True if the file is tagged as binary (not text)<br />

–c file True if file is a character special file<br />

–d file True if file is a directory<br />

–e file True if file exists<br />

–Ea file<br />

True if the file has the APF extended attribute<br />

–Ep file<br />

True if the file has the program control extended attribute<br />

–Es file<br />

True if the file has the shared address space extended attribute<br />

–El file<br />

True if the file has the shared library extended attribute<br />

–f file True if file is an ordinary file<br />

–g file True if the set-group-ID attribute of file is on<br />

–h file True if file is a symbolic link<br />

–k file True if the “sticky” bit is on file is on<br />

–L file True if file is a symbolic link<br />

–Ma file<br />

True if the file has any Multilevel Security seclabel.<br />

–n string<br />

True if the length of string is greater than zero<br />

–p file True if file is a FIFO (named pipe)<br />

–r file True if file is readable (based on the security product’s check against the<br />

effective user/group)<br />

694 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!