cs:navody:ssh:dmls

Toto je starší verze dokumentu!


DMLS

NAME
SYNOPSIS
IMPLEMENTATION
DESCRIPTION
NOTES
ENVIRONMENT VARIABLES
EXAMPLES
FILES
COPYRIGHT
SEE ALSO

NAME

dmls − Lists contents of directories

SYNOPSIS

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

IMPLEMENTATION

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

DESCRIPTION

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 except . and .. .

-b

Non-printable characters are printed as octal escapes. 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. Symbolic links are followed to see if they might be a directory.

-g

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.

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

-i

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

-k

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

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

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:

REG

File not managed by DMF

MIG

Migrating

ARC

Archiving

DUL

Dual-state

OFL

Offline

UNM

Unmigrating

NMG

Nonmigratable file

PAR

Partial-state file

N/A

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.

INV

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.

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

-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 group. It does list mode, number of links, owner, size in bytes, and time of last modification for each file.

-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 1024 bytes.

-S

Sort output by file size.

-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

p

FIFO (named pipe) special file

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 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:

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.

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.

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

     -rwxr--r--

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.

     -rwsr-xr-x

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.

     -rw-rwl---

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

FILES

/etc/passwd

User IDs for ls -l and ls -o.

/etc/group

Group IDs for ls -l and ls -g.

/usr/lib/locale/locale/LC_MESSAGES/uxcore.abi

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

COPYRIGHT

Copyright (c) 2007 SGI. All rights reserved.

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

SEE ALSO

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