gtpo1m5zOperations

ZFILE ls-List File and Directory Names and Attributes

Use this command to display:

Requirements and Restrictions

Format




-a
lists all entries including those that start with a period (.), which are referred to as hidden files.

-C
displays the list in a multiple column format.

-d
displays information about the specified directory itself instead of information about the files and subdirectories under that directory.

-F
indicates the file characteristics by putting one of the following characters after the file name, if applicable:

/
specifies a directory.

|
specifies a first-in-first-out (FIFO) special file, which is also referred to as a named pipe.

@
specifies a symbolic link.

*
specifies an executable file.

-i
displays the file serial (i-node) numbers.

-l
displays the attributes of a file or directory in a long format, including the access permissions, number of links, user ID (UID), group ID (GID), file size, and time of the last modification. If you specify a directory, information about every file in that directory (one file per line) is displayed.

-q
displays all nonprintable characters as a question mark (?).

-R
recursively displays the contents of the specified directory and all subdirectories.

-r
sorts the list in reverse of the usual order; you can combine this with other options that specify the sort order of the list.

-t
sorts the list by the last modified time stamp.

-1
displays the list in a single-column format.

path
is the path name of the file or directory whose contents you are displaying. If you do not specify this parameter, the contents of the current working directory are displayed.

Additional Information

Examples

The following example lists the contents of the /tmp directory.

+--------------------------------------------------------------------------------+
|User:   ZFILE ls /tmp                                                           |
|                                                                                |
|System: FILE0001I 13:11:31 START OF DISPLAY FROM ls /tmp                        |
|        dir1               dummy.executable    dummy.readonly                   |
|        dir2               dummy.file                                           |
|        END OF DISPLAY                                                          |
+--------------------------------------------------------------------------------+

The following example lists all the entries in the /tmp directory, including the hidden files.

+--------------------------------------------------------------------------------+
|User:   ZFILE ls -a /tmp                                                        |
|                                                                                |
|System: FILE0001I 13:11:31 START OF DISPLAY FROM ls -a /tmp                     |
|        .                  dir1               dummy.executable    dummy.readonly|
|        ..                 dir2               dummy.file                        |
|        END OF DISPLAY                                                          |
+--------------------------------------------------------------------------------+

The following example lists the attributes of all the files and subdirectories in the /tmp directory using the long format (-l). The first line of the display shows the total number of file system blocks occupied by files in the directory. The remainder of the display contains the following information:

+--------------------------------------------------------------------------------+
|User:   ZFILE ls -l /tmp                                                        |
|                                                                                |
|System: FILE0001I 13:11:31 START OF DISPLAY FROM ls -l /tmp                     |
|        total 5                                                                 |
|        drwxrwxrwx   1 root     system         4 May  5 09:30 dir1              |
|        drwxrwxrwx   1 root     system         3 May  5 09:30 dir2              |
|        -rwxr-x--x   1 apache   websrvr       12 May  5 09:34 dummy.executable  |
|        -rwxrwxrwx   1 apache   websrvr       12 May  5 09:31 dummy.file        |
|        -r--r--r--   1 apache   websrvr       12 May  5 09:35 dummy.readonly    |
|        END OF DISPLAY                                                          |
+--------------------------------------------------------------------------------+

The following example lists the attributes for all the files and subdirectories in the root (/) directory, including the hidden files. See the previous example for an explanation of the display.

+--------------------------------------------------------------------------------+
|User:   ZFILE ls -la /                                                          |
|                                                                                |
|System: FILE0001I 10.19.37 START OF DISPLAY FROM ls -la /                       |
|        total 6                                                                 |
|        drwxr-xr-x   0 root     bin            6 Jun  1 10:16 .                 |
|        drwxr-xr-x   0 root     bin            6 Jun  1 10:16 ..                |
|        drwxr-xr-x   1 root     bin            6 May 29 06:04 dev               |
|        drwxrwxrwx   1 nobody   tpfuser        3 Jun  1 10:16 etc               |
|        drwxrwxrwx   1 nobody   tpfuser        5 Jun  1 10:18 tmp               |
|        drwxrwxrwx   1 root     bin            7 May 29 14:41 usr               |
|        END OF DISPLAY                                                          |
+--------------------------------------------------------------------------------+

The following example lists the file attributes for a file.

+--------------------------------------------------------------------------------+
|User:   ZFILE ls -l /tmp/dummy.file                                             |
|                                                                                |
|System: FILE0001I 13:11:31 START OF DISPLAY FROM ls -l /tmp/dummy.file          |
|        total 1                                                                 |
|        -rwxrwxrwx   1 apache   websrvr       12 May  5 09:31 dummy.file        |
|        END OF DISPLAY                                                          |
+--------------------------------------------------------------------------------+

The following example lists multiple files and directories.

+---------------------------------------------------------------------------------------------+
|User:   ZFILE ls /usr/aa /tmp/dir2 /tmp/dir1/a.html /tmp/dir1 /tmp/dir1/dir2                 |
|                                                                                             |
|System: FILE0001I 13:11:31 START OF DISPLAY FROM ls /usr/aa /tmp/dir2 /tmp/dir1/a.ht...      |
|        /tmp/dir1/a.html    /usr/aa                                                          |
|                                                                                             |
|        /tmp/dir1/:                                                                          |
|        a.html              dir2                                                             |
|                                                                                             |
|        /tmp/dir1/dir2:                                                                      |
|        a.exe                                                                                |
|                                                                                             |
|        /tmp/dir2:                                                                           |
|        b.html              bb.html                                                          |
|        END OF DISPLAY                                                                       |
+---------------------------------------------------------------------------------------------+

Related Information