Toto je starší verze dokumentu!




dmls − Lists contents of directories


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


SGI systems licensed for the Data Migration Facility (DMF) and systems functioning as DMF clients.


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:




Lists one entry per line of output.


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


Lists all entries except . and .. .


Non-printable characters are printed as octal escapes. All multibyte characters are considered printable.


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).


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


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


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.


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. Symbolic links are followed to see if they might be a directory.


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


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.)


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


Modifies the -s parameter to specify kilobyte blocks. Overrides the BLOCKSIZE environment variable.


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.

On IRIX systems, if the file has an Access Control List (ACL), the mode specification will be followed by a plus sign (+). On Linux systems, if support for ACLs is installed and the file has an access ACL that is not equivalent to the file permission bits, or if it has a default 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.

The state of DMF files can be as follows:


File not managed by DMF












Nonmigratable file


Partial-state file


DMF cannot determine the file’s state. This may be because the file is not in a DMF-managed filesystem or because an error occurred when attempting to retrieve the file’s state.


The file is in an invalid state. That is, the file’s stat block contains fields that are inconsistent with each other and so do not represent any valid file state.


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).


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


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


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


Appends a backslash (/) after each file name if the file is a directory.


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


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


Recursively lists subdirectories encountered.


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


Sort output by file size.


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.


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


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


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:


Block special file


Character special file




Symbolic link


FIFO (named pipe) special file


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.


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

     -rwxrwxrwx 1 u4710 dev     10876 2007-02-19 09:56 (REG) part2

Reading from right to left, you see that the current directory holds one file, named part2. The file has the DMF state of REG. The last time that file’s contents were modified was 9:56 A.M. on February 19, 2007. The file contains 10,876 bytes. The owner of the file, or the user, belongs to the group dev and has the login name 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:


The file is readable.


The file is writable.


The file is executable.


The indicated permission is not granted.


Mandatory locking occurs during access (the set-group-ID is on, and the group execution bit is off).


The set-user-ID or set-group-ID bit is on, and the corresponding user or group execution bit is also on.


Undefined bit-state (the set-user-ID bit is on and the user execution bit is off).


The 1000 (octal) bit, or sticky bit, is on and execution is on. (See chmod(1) for more information).


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.


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.

The dmls command was rewritten in DMF 3.7.0. As a result of the rewrite, the following dmls options were removed : D, H, M, O, P, T, v. On IRIX and SGI ProPack on SGI Altix ia64 systems, please see the sgi_dmls(1) man page for more information about these options.


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.


The first example shows 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 2006-07-22 15:01 (OFL) dmf_tst.00005
     -rw-r--r-- 1 kfr   sys  26362860 2006-07-22 15:02 (OFL) dmf_tst.00015
     -rw-r--r-- 1 kfr   sys  36199305 2006-07-22 15:03 (OFL) dmf_tst.00025
     -rw-r--r-- 1 kfr   sys  39310090 2006-07-22 15:04 (OFL) dmf_tst.00035
     -rw-r--r-- 1 kfr   sys  51488786 2006-07-22 15:06 (OFL) dmf_tst.00045
     -rw-r--r-- 1 kfr   sys  16373855 2006-07-22 15:52 (OFL) dmf_tst.00163
     -rw-r--r-- 1 kfr   sys  36199305 2006-07-22 15:53 (UNM) dmf_tst.00183
     -rw-r--r-- 1 kfr   sys  39310090 2006-07-22 15:55 (OFL) dmf_tst.00193
     -rw-r--r-- 1 kfr   sys  17829904 2006-07-22 15:59 (UNM) dmf_tst.00223
     -rw-r--r-- 1 kfr   sys  14572782 2006-07-22 16:06 (UNM) dmf_tst.00233
     -rw-r--r-- 1 kfr   sys  16373855 2006-07-22 16:08 (OFL) dmf_tst.00246
     -rw-r--r-- 1 kfr   sys  27294750 2006-07-22 17:12 (DUL) dmf_tst.00606
     -rw-r--r-- 1 kfr   sys  72121722 2006-07-22 17:17 (OFL) dmf_tst.00616
     -rw-r--r-- 1 kfr   sys  22807602 2006-07-22 17:24 (DUL) dmf_tst.00636

Example 2: 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.


Example 3: 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.


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


Example 5: 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 6: 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



User IDs for ls -l and ls -o.


Group IDs for ls -l and ls -g.


Language-specific message file. [See LANG on environ(5).]


Copyright (c) 2007 SGI. All rights reserved.

Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved.


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

chmod(1) for more information about file permissions

Poslední úprava: 26.10.2012 02:53