DMLS(1)

NAME

dmls - Lists contents of directories

SYNOPSIS

dmls [-1] [-a] [-A] [-b] [-c] [-C] [-d] [-f] [-F] [-g] [-h] [-H] [-i] [-l] [-L] [-m] [-M] [-n] [-o] [-O] [-p] [-q] [-r] [-R] [-s] [-t] [-u] [-x] [names ...]

IMPLEMENTATION

SGI IRIX systems licensed for the Data Migration Facility (DMF)

DESCRIPTION

The dmls command is based on the IRIX version of the ls(1) command.

The dmls command lists each specified file or directory path.

For each directory argument, dmls lists the contents of the directory; for each file argument, dmls repeats the directory name and any other information requested. The output is sorted alphabetically by default. When you do not provide arguments, the current directory is listed. When you provide several arguments, the arguments are first sorted appropriately, but file arguments appear before directories and their contents.

See the ENVIRONMENT VARIABLES section for information on how dmls uses environment variables to display output.

The dmls command has three major listing formats. The default format for output directed to a terminal is multi-column with entries sorted vertically. The options -C and -x enable multi-column formats; the -m option enables stream output format, in which files are listed horizontally, separated by commas.

The dmls command accepts the following options:

     Option    Description
-1
Lists one entry per line of output.

-a
Lists all entries, including those that begin with a period or dot character (.), which are normally not listed.

-A
Lists all entries, but not those those that begin with a period or dot character (.).

-b
Forces printing of non-printable characters to be in the octal \ddd notation. All multibyte characters are considered printable.

-c
Uses the time of last modification of the inode (file created, mode changed, and so on) for sorting (when used with -t) or printing (when used with -l).

-C
Lists entries in multi-column format with entries sorted vertically. This is the default output format.

-d
If an argument is a directory, lists only its name (not its contents); often used with -l to obtain the status of a directory.

-f
Forces each argument to be interpreted as a directory and lists the name found in each slot. This option turns off -l, -r, -s, and -t, and turns on -a. The order of printing is the order in which entries appear in the directory.

-F
Appends a character to each file name indicating the file type. For regular files that are executable, appends an asterisk (*). The file type indicators are a backslash (\) for directories, an at sign (@) for symbolic links, an equal sign (=) for AF_UNIX address family sockets, and nothing for regular files. Unless you also use the -H option, symbolic links are followed to see if they might be a directory.

-g
Like -l, but does not list the group of a file. It does list mode, number of links, owner, size in bytes, and time of last modification for each file.

-h
When file sizes are printed, prints them in a format that is easier to read for large files. The size consists of the number of units followed by a unit specifier (b for bytes, K for kilobytes, M for megabytes, G for gigabytes, and so on.)

-H
If the file is a symbolic link, lists the file itself. This is the default behavior, except for a symbolic link to a directory in the absence of the -l option, in which case the -L behavior is used by default. -H and -L cancel one another in command line order.

-i
For each file, prints the inode number in the first column of the report.

-l
Lists file names in long format, giving mode, number of links, owner, group, size in bytes, time of last modification, and, in parentheses before the file name, the DMF state. See the description of -O for a list of DMF states.

If the file has an Access Control List (ACL), the mode specification will be followed by a plus sign (+). If the file is a special file, the size field contains the major and minor device numbers rather than a size. If the file is a symbolic link, the file name is printed followed by dash and greater than character (->) and the path name of the referenced file.

-L
When listing status, if an argument is a symbolic link, lists the status of the file or directory referenced by the link rather than that of the link itself. This option will have no effect if the name argument has no reference (that is, it is a dangling link).

-m
Stream output format; lists file names horizontally, separated by commas.

-M
Prints the mandatory access control (MAC) label of each entry, enclosed in square brackets. If MAC is not enabled, the square brackets are empty.

-n
Like -l, but lists the owner's UID and group's GID numbers rather than the associated character strings.

-o
Like -l, but does not list the file's owner. It does list mode, number of links, group, size in bytes, and time of last modification for each file.

-O
Lists the DMF offline state of files. The state can be as follows:

REG      File not managed by DMF
MIG      Migrating
DUL      Dual-state
OFL      Offline
UNM      Unmigrating
NMG      Nonmigratable file
INV      DMF cannot determine the file's state

-p
Appends a backslash (\) after each file name if the file is a directory.

-q
Forces printing of nonprintable characters in file names as the character question mark (?). All multibyte characters are considered printable.

-r
Reverses the order of the dmls sort to get reverse alphabetic or oldest first order, as appropriate for your other options.

-R
Recursively lists subdirectories encountered.

-s
Provides size in blocks, including indirect blocks, for each entry. Holes in files are not included in the size. A block is 512 bytes.

-t
Sorts by time stamp (latest first) instead of by name. The default is the last modification time. For more information, see the -u and -c option descriptions.

-u
Sorts by time of last access instead of last modification (when used with the -t option) or printing (when used with the -l option).

-x
Lists files in multi-column format with entries sorted horizontally rather than vertically.

names
Files to be listed. If no names are specified, dmls lists all files in the current directories.

Specifying more than one of the options in the following mutually exclusive pairs is not considered an error: -C and -l (letter l), -m and -l (letter l), -x and -l (letter l), -C and -1 (number one), -c and -u. The last option specified in each pair determines the output format.

The mode printed under the -l option consists of 11 possible characters. The first character is one of the following:

b      Block special file
c      Character special file
d      Directory
l      Symbolic link
m      XENIX shared data (memory)
p      FIFO (named pipe) special file
s      XENIX semaphore
S      AF_UNIX address family socket
-      Regular file

The next 9 characters are interpreted as three sets of 3 bits each. The first set refers to the owner's permissions, the next to permissions of others in the user-group of the file, and the last to all others. Within each set, the three characters indicate permission to read, to write, and to execute the file as a program, respectively. For a directory, execute permission is interpreted as permission to search the directory for a specified file.

Example:

The command ls -l (the long list) prints its output as follows:

          -rwxrwxrwx  1 u4710  dev    10876  May 28 9:56 part2
Reading from right to left, you see that the current directory holds one file, named part2. The last time that file's contents were modified was 9:56 A.M. on May 28. The file contains 10,876 bytes. The owner of the file, or the user, belongs to the group dev and her login name is u4710. The number 1 in the second column indicates the number of links to file part2. The dash and letters tell you that user, group, and others have permissions to read, write, and execute part2.
The execute (x) symbol here occupies the third position of the three-character sequence. A dash (-) in the third position would indicate a denial of execution permissions.

The permissions are indicated as follows:

r      The file is readable.
w      The file is writable.
x      The file is executable.
-      The indicated permission is not granted.
l      Mandatory locking occurs during access (the set-group-ID is on, and the group execution bit is off).
s      The set-user-ID or set-group-ID bit is on, and the corresponding user or group execution bit is also on.
S      Undefined bit-state (the set-user-ID bit is on and the user execution bit is off).
t      The 1000 (octal) bit, or sticky bit, is on and execution is on. (See chmod(1) for more information).
T      The 1000 bit is turned on, and execution is off (undefined bit-state)

For user and group permissions, the third position is sometimes occupied by a character other than x or -. The letter s may also occupy this position; it refers to the state of the set-ID bit, whether it be the user's or the group's. The ability to assume the same ID as the user during execution is, for example, used during login when you begin as root but must assume the identity of the user given at login.

In the case of the sequence of group permissions, l may occupy the third position. l refers to mandatory file and record locking. This permission describes a file's ability to allow other processes to lock its reading or writing permissions during access.

For other permissions, the third position may be occupied by t or T. These refer to the state of the sticky bit and execution permissions.

NOTES

Unprintable characters in file names may confuse the columnar output options.

The total block count will be incorrect if there are hard links among the files.

ENVIRONMENT VARIABLES

The dmls command uses supplementary code set characters according to the location specified in the LC_CTYPE and LC_COLLATE environment variables, except as noted under the -b and -q options. See the environ(5) man page for more information.

To determine output formats for the -C, -x, and -m options, dmls uses the COLUMNS environment variable to determine the number of positions available on one output line. If this variable is not set, and the output is directed to a terminal, the number of positions is obtained from the terminal device. If this information cannot be obtained, dmls assumes 80 columns.

EXAMPLES

The first three examples show how you can use dmls to display migrated files. The remaining examples are general ls examples.

Example 1: The following command displays the files in directory /dmi4/kfr. The listing indicates offline and dual-state files as well as files that are currently unmigrating:

 # dmls -l /dmi4/kfr
 total 68584
 -rw-r--r--   1 kfr      sys      16373855 Jul 22 15:01 (OFL) dmf_tst.00005
 -rw-r--r--   1 kfr      sys      26362860 Jul 22 15:02 (OFL) dmf_tst.00015
 -rw-r--r--   1 kfr      sys      36199305 Jul 22 15:03 (OFL) dmf_tst.00025
 -rw-r--r--   1 kfr      sys      39310090 Jul 22 15:04 (OFL) dmf_tst.00035
 -rw-r--r--   1 kfr      sys      51488786 Jul 22 15:06 (OFL) dmf_tst.00045
 -rw-r--r--   1 kfr      sys      16373855 Jul 22 15:52 (OFL) dmf_tst.00163
 -rw-r--r--   1 kfr      sys      36199305 Jul 22 15:53 (UNM) dmf_tst.00183
 -rw-r--r--   1 kfr      sys      39310090 Jul 22 15:55 (OFL) dmf_tst.00193
 -rw-r--r--   1 kfr      sys      17829904 Jul 22 15:59 (UNM) dmf_tst.00223
 -rw-r--r--   1 kfr      sys      14572782 Jul 22 16:06 (UNM) dmf_tst.00233
 -rw-r--r--   1 kfr      sys      16373855 Jul 22 16:08 (OFL) dmf_tst.00246
 -rw-r--r--   1 kfr      sys      27294750 Jul 22 17:12 (DUL) dmf_tst.00606
 -rw-r--r--   1 kfr      sys      72121722 Jul 22 17:17 (OFL) dmf_tst.00616
 -rw-r--r--   1 kfr      sys      22807602 Jul 22 17:24 (DUL) dmf_tst.00636
Example 2: The following command displays the DMF state of files in /dmi4/djc. This time information is obtained by using the -O option, which does not produce the long output:

#dmls -O /dmi4/djc
(UNM) dmf_tst.00146
(OFL) dmf_tst.00156
(OFL) dmf_tst.00165
(OFL) dmf_tst.00175
(UNM) dmf_tst.00185
(OFL) dmf_tst.00195
(OFL) dmf_tst.00225
(DUL) dmf_tst.00428
(NMG) dmf_tst.00468
(OFL) dmf_tst.00558
(OFL) dmf_tst.00568
(DUL) dmf_tst.00578
(OFL) dmf_tst.00598

Example 3: The following command displays the DMF states of files and directories in the file system /dmi4. pipe is a pipe file, and passwd is a regular file that has not been migrated:

#dmls -O /dmi4
(OFL) dmf_tst.00070
(OFL) dmf_tst.00089
(OFL) dmf_tst.00099
(UNM) dmf_tst.00109
(INV) kfr
(NMG) passwd
(INV) pce
(INV) pipe

Example 4: The following is an example of a file's permissions. The file is readable, writable, and executable by the user and readable by the group and others.

-rwxr--r--

Example 5: The following example shows a file that is readable, writable, and executable by the user, readable and executable by the group and others, and allows its user ID to be assumed, during execution, by the user presently executing it.

-rwsr-xr-x

Example 6: The following file permission example shows that the file is writable only by the user and the group and can be locked during access.

-rw-rwl---

Example 7: The following command line prints the names of all files in the current directory, including those that begin with a dot (.), which normally do not print.

ls -a

Example 8: The following command line provides information on all files, including those that begin with a dot (.) because the -a option is specified. The inode number of the file is printed in the left-hand column (-i); the size (in blocks) of the files is printed in the column to the right of the inode numbers (-s); and the report is displayed in the numeric version of the long list, printing the UID (instead of user name) and GID (instead of group name) numbers associated with the files(-n). When the sizes of the files in a directory are listed, a total count of blocks, including indirect blocks, excluding holes, is printed.

ls -aisn

FILES

/etc/passwd
User IDs for ls -l and ls -o.

/etc/group
Group IDs for ls -l and ls -g.

/etc/mac
MAC label names for ls -M.

/usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
Language-specific message file. [See LANG on environ(5).]

SEE ALSO

dmfind(1) and dmattr(1) for information about obtaining the DMF state of files

chmod(1) for more information about file permissions