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.

Description<br />

Options<br />

ls lists files and directories. If the pathname is a file, ls displays information on the<br />

file according to the requested options. If it is a directory, ls displays information on<br />

the files and subdirectories therein. You can get information on a directory itself<br />

using the –d option.<br />

If you do not specify any options, ls displays only the filenames. When ls sends<br />

output to a pipe or a file, it writes one name per line; when it sends output to the<br />

terminal, it uses the –C (multicolumn) format.<br />

Note: Codesets which are aliases of each other exist which may cause the test to<br />

fail, since the file inquiry operator may return an alias of the codeset you are<br />

testing.<br />

ls displays at least the filename; you can request more information with the<br />

following options:<br />

–A Lists all entries including those starting with periods (.); but excluding any .<br />

or .. entries.<br />

–a Lists all entries including those starting with a period (.).<br />

–b Displays nonprintable characters as octal bytes with the form \ooo.<br />

–C Puts output into columns, sorted vertically; this is the default output format<br />

to the terminal.<br />

–c Uses the time of the last change of the file’s attributes for sorting (–t) or<br />

displaying (–l) .<br />

–d Does not display the contents of named directories, but information on the<br />

directories themselves.<br />

–D Displays from directories.<br />

–E Displays extended attributes for regular files:<br />

a Program runs APF-authorized if linked AC=1<br />

p Program is considered program-controlled<br />

s Program is enabled to run in a shared address space<br />

l Program is loaded from the shared library region<br />

— Attribute not set<br />

See “Long Output Format” on page 365.<br />

–F Puts a / after each directory name, a * after every executable file, a | after<br />

every FIFO file, a @ after every symbolic link, and a = after every socket. It<br />

also puts an & character after an external link name.<br />

–f Forces the pathname argument to be a directory; turns off sorting. ls gives<br />

the ordered list of filenames in a directory file. The directory file is read and<br />

the filenames are listed in the same order as they are returned. The<br />

contents of a directory file are shown.<br />

–g Same as –l except that it does not display owner.<br />

–g turns on the Long Output Format. See “Long Output Format” on page<br />

365 for details.<br />

ls<br />

Chapter 2. Shell command descriptions 363

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

Saved successfully!

Ooh no, something went wrong!