| Skip Navigation Links | |
| Exit Print View | |
|
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
1. User Commands (Man Pages Section 1)
2. Maintenance Commands (Man Pages Section 1M)
3. Library Functions (Man Pages Section 3)
4. Library Functions (Man Pages Section 3X)
5. File Formats (Man Pages Section 4)
NAME
sls - Lists directory content
SYNOPSIS
sls [-abcdf] [--full-time] [-g] [--help] [-iklmnpqrstu]
[--version] [-w cols] [-x] [-ABCDFG] [-I pattern] [-KLNQRS]
[-T cols] [-UX12] [file ...]
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
This man(1) page describes the Oracle Corporation extensions
to the GNU version of the ls(1) command. Oracle Corporation
modified the ls(1)command and added the following features
to support Sun QFS and SAM-QFS software:
o -D, which lists a detailed description of each file.
o -2, which lists two lines of output for each file.
o -K, which lists all segments of a segmented file.
The sls command generates information for each given file or
directory path. Directory contents are sorted
alphabetically. By default, if standard output is a
terminal, files are listed in columns, sorted vertically.
Otherwise they are listed one per line.
The sls command also accepts verbose, multicharacter
equivalents of many single-character options. These
multicharacter options are not listed in the SYNOPSIS
section of this man page, but they are noted in the option
descriptions.
OPTIONS
The sls(1) command accepts the following options:
-a Lists all files in directories. Includes all files
that start with a period (.). Equivalent to specifying
--all.
-b Quotes nongraphic characters in file names using
alphabetic and octal backslash sequences like those
used in C. Equivalent to specifying --escape.
-c Sorts directory contents according to the file status
change times instead of the modification times. If the
long listing format is being used, it generates the
status change time instead of the modification time.
Equivalent to specifying --time=ctime and
--time=status.
-d Lists directories like other files rather than listing
their contents. Equivalent to specifying --directory.
-f Does not sort directory contents. Lists them in
whatever order they are stored on the disk. The same
as specifying both -a and -U and disabling -l, -s, and
-t.
--full-time
Lists times in full, rather than using the standard
abbreviation heuristics.
-g Ignored. For UNIX compatibility.
--help
Writes a usage message to standard output and exits
successfully.
-i Prints the inode number of each file to the left of the
file name. If -2 is also specified, the inode number
of the directory is printed on the second line. If -D
is also specified, the inode numbers are printed.
Equivalent to specifying --inode.
-k If file sizes are being listed, prints them in
kilobytes. This overrides the POSIXLY_CORRECT
environment variable. Equivalent to specifying
--kilobytes.
-l In addition to the name of each file, prints the file
type, permissions, number of hard links, owner name,
group name, size in bytes, and timestamp (the
modification time unless other times are selected).
For files with a time that is more than 6 months old or
more than 1 hour into the future, the timestamp
contains the year instead of the time of day.
Equivalent to specifying --format=long and
--format=verbose.
-m Lists files horizontally, with as many as fit on each
line, separated by commas. Equivalent to specifying
--format=commas.
-n Lists the numeric UID and GID instead of the names.
Equivalent to specifying --numeric-uid-gid.
-p Suffixes each file name with a character that indicates
the file type. For directories, the suffix is a slash
(/). For symbolic links, the suffix is an at sign (@).
For FIFOs, the suffix is a pipe symbol (|). For
sockets, the suffix is an equal sign (=). There is no
suffix for regular files.
-q Prints question marks instead of nongraphic characters
in file names. Equivalent to specifying
--hide-control-chars.
-r Sorts directory contents in reverse order. Equivalent
to specifying --reverse.
-s Prints the size of each file in 1-kilobyte blocks to
the left of the file name. If the POSIXLY_CORRECT
environment variable is set, 512-byte blocks are used
instead. Equivalent to specifying --size.
-t Sorts directory contents by timestamp instead of
alphabetically. The newest files are listed first.
Equivalent to specifying --sort=time.
-u Sorts the directory contents according to the files'
last access time instead of the modification time. If
the long listing format is being used, prints the last
access time instead of the modification time.
Equivalent to specifying --time=atime, --time=access,
and --time=use.
--version
Writes version information to standard output and exits
successfully.
-w cols
Assumes the screen is cols columns wide. The default
is taken from either the terminal driver (if possible)
or the COLUMNS environment variable (if set).
Otherwise the default is 80. Equivalent to specifying
--width cols.
-x Lists the files in columns, sorted horizontally.
Equivalent to specifying --format=across and
--format=horizontal.
-A Lists all files in directories, except for those
beginning with a period (.) or two periods (..).
Equivalent to specifying --almost-all.
-B In the output, suppresses files that end with a tilde
(~) unless they are specified on the command line.
Equivalent to specifying --ignore-backups.
-C Lists files in columns, sorted vertically. Equivalent
to specifying --format=vertical.
-D Uses the long-line format (-l) and lists a detailed
description for each file. Additional lines are listed
with the file attributes, archive copies, and the
times. For removable media files, the output shows the
media type, blocksize, the VSN(s), the sizes, and
position(s).
Example:
server# sls -D mickey.gif
mickey.gif:
mode: -rw-r--r-- links: 1 owner: root group: other
length: 319279 admin id: 7 inode: 1407.5
project: system(0)
offline; archdone; stage -n;
copy 1: ---- May 21 10:29 1e4b1.1 lt DLT001
access: May 21 09:25 modification: May 21 09:25
changed: May 21 09:26 attributes: May 21 10:44
creation: May 21 09:25 residence: May 21 10:44
The first line indicates the file's mode or
permissions, the number of links to the file, the owner
(or user) of the file, and the group to which the owner
belongs.
The second line indicates the file's length in bytes,
the administrative ID number (see samchaid(1M)), and
the inode number plus generation number.
The third line indicates the file's project name and
project ID (see schproj(1)).
The fourth line shows the file states and attributes.
Possible file states, which are set by the system, are
as follows:
State Meaning
damaged The file is damaged.
offline The file is offline.
archdone Indicates that the archiver has completed
processing the file. There is no more work
that the archiver can do on a file. Note
that archdone does not indicate that the file
has been archived.
Possible file attributes, which are set by the user,
are as follows:
Attribute Meaning
archive -n The file is marked never archive
(superuser only).
archive -C The file is marked for concurrent
archiving.
release -n The file is marked for never release.
release -a This file is marked for release as soon
as 1 copy is made.
release -p The file is marked for partial release.
partial=nk indicates that the first n
kilobytes of disk space are retained in
disk cache for this file.
offline/online indicates the first n
kilobytes of disk space are
offline/online.
stage -n The file is marked never stage.
stage -a The file is marked for associative
staging.
setfa -D The file is marked for direct I/O.
setfa -gn The file is marked for allocation on
stripe group n.
setfa -sm The file is marked for allocation with a
stripe width of m.
segment nm stage_ahead x
The file is marked for segment access.
segment=nm indicates n megabytes is the
segment size. stage_ahead=x indicates x
segments will be staged ahead of the
current segment.
The next line appears only for a segment index. The
line is as follows:
segments n , offline o , archdone a , damaged d
In this line, n is the number of data segments; o is
the number of data segments offline; a is the number of
data segments that have met their archiving
requirements; and d is the number of data segments that
are damaged.
The archive copy line is displayed only if there is an
active or stale copy. An example of archive copy line
output is as follows:
copy 1: ---- Sep 11 10:43 3498f.1 mo OPT001
The first field indicates the archive copy number.
The second field consists of four dashes, as follows:
o Dash 1 indicates a stale or active entry, as follows:
Content Meaning
S The archive copy is stale. This means that
the file has been modified, and this archive
copy is for a previous version of the file.
U The copy has been unarchived.
- The archive copy is active and valid.
o Dash 2 indicates the archive status, as follows:
Content Meaning
r The archiver will rearchive this copy.
- This archive copy will not be rearchived.
o Dash 3 is unused.
o Dash 4 indicates a damaged, undamaged, or verified
status, as follows:
Content Meaning
D The archive copy is damaged. This archive
copy will not be staged.
V The archive copy has been verified. The file
is flagged for data verification and this
copy has been verified.
- The archive copy is not damaged, and if the
file is flagged for data verification, this
copy has not yet been verified. It is a
candidate for staging.
The third field shows the date and time when the
archive copy was written to the media.
The fourth field contains two hex numbers separated by
a period (.). The first hex number, 3498f, is the
position of the beginning of the archive file on the
media. For disk archive copies the first number is an
index to the file path (see below). The second hex
number is the file byte offset divided by 512 of this
copy on the archive file. In this example, 1 means
that this is the first file on the archive file because
it is offset by 512 bytes, which is the length of the
tar(1) header.
The last two fields indicate the media type and the
volume serial name on which the archive copy resides.
For media type dk (disk archiving) the volume serial
name is the disk volume as defined in diskvols.conf(4),
and there is an additional field which is the path to
the archived tar file. This path is relative to the
pathname for the disk volume as specified in the
diskvols.conf file.
For media type cb (Sun StorageTek 5800 Storage System
disk archiving) the volume serial name is the disk
volume as defined in diskvols.conf(4), and there is an
additional field which is the metadata string for the
archived tar file.
Various times are displayed for the file as follows:
Time Type Meaning
access Time the file was last accessed.
modification Time the file was last modified.
changed Time the information in the inode
was last changed.
attributes Time that Sun QFS or SAM-QFS file
system attributes were last
changed.
creation Time the file was created.
residence Time the file changed from offline
to online or vice versa.
The WORM feature changes the meaning of some of the
timing attributes for a file. In addition, information
regarding retention duration, state, and period (the
latter in YYYYy DDd HHh MMm format) is available. The
changes to original time attributes and the retention
attributes are as follows:
Time Type Meaning
modification Start time for the retention
period.
changed Time the retention period was last
changed.
attributes The date the retention period will
expire.
retention The retention state of the file,
active or over.
retention-period The time supplied when the
retention period was set on the
file.
Directories are handled differently as retention
periods are the default period for files and
subdirectories contained in that directory. Unlike
files, retention periods on directories can be
shortened. Setting the WORM flag on a directory should
be a reasonably rare occurance as the WORM feature is
inherited from the parent. When the WORM flag is set
on a directory only the state is changed to "worm-
capable" indicating the directory can contain retained
files.
The checksum attributes are displayed on the line as
follows.
checksum: -g -u -a 1 0xec02591b41dca8aa 0x2cdc5977fdd5bbc4
The previous line is displayed for a file with any of
the possible checksum attributes set. If -g is set,
the file is marked for generating a checksum. If -u is
set, the file is marked for verifying the checksum.
The -a precedes the numeric algorithm indicator which
specifies which algorithm is used when generating the
checksum value. If two hex numbers appear, there is a
valid checksum and the checksum value is the 2 hex
numbers.
For a removable media file, the following lines are
displayed:
iotype: blockio media: lt vsns: 1 blocksize: 262144
section 0: 104071168 a358.0 CFX808
The first line shows the I/O type (always blockio), the
media type, number of volumes, and blocksize. The
second and following lines show the section length,
position and offset, and VSN for each volume. There
will only be one section line except in the case of
volume overflow. The blocksize will be zero until the
first time the volume is loaded, at which time it will
be filled in with the correct value.
The -D option is equivalent to specifying
--format=detailed.
-F Suffixes each file name with a character that indicates
the file type. For regular files that are executable,
the suffix is an asterisk (*). For directories, the
suffix is a slash (/). For symbolic links, the suffix
is an at sign (@). For FIFOs, the suffix is a pipe
symbol (|). For sockets, the suffix is an equal sign
(=). There is no suffix for regular files. Equivalent
to specifying --classify.
-G Suppresses group information in a long format directory
listing. Equivalent to specifying --no-group.
-I pattern
Suppresses files whose names match the shell pattern
pattern unless they are specified on the command line.
As in the shell, an initial period (.) in a file name
does not match a wildcard at the start of pattern.
Equivalent to specifying --ignore pattern.
-K Lists all segments for a segmented file. Must be
specified in conjunction with the -2 or -D options.
-L Lists the files linked to by symbolic links instead of
listing the content of the links. Equivalent to
specifying --dereference.
-N Does not quote file names. Equivalent to specifying
--literal.
-Q Encloses file names in double quotes and quotes
nongraphic characters as in C. Equivalent to
specifying --quote-name.
-R Lists the content of all directories recursively.
Equivalent to specifying --recursive.
-S Sorts directory content by file size instead of
alphabetically. The largest files are listed first.
Equivalent to specifying --sort=size.
-T cols
Assumes that each tab stop is cols columns wide. The
default is 8. Equivalent to specifying --tabsize cols.
-U Does not sort directory content. Content is listed in
the order it is stored in on the disk. Equivalent to
specifying --sort=none.
-X Sorts directory content alphabetically by file
extension according to the characters after the last
period (.). Files with no extension are sorted first.
Equivalent to specifying --sort=extension.
-1 Lists one line per file. Equivalent to specifying
--format=single-column.
-2 Lists two lines per file. The first line is identical
to that obtained when you specify long format output
using the -l option. The second line lists the file
attributes, media requirements, and the creation time.
Removable media files show the media type and the VSN.
Nonchecksum file attributes are formatted as a string
of ten characters.
The file attributes in the second line are indicated by
their position, as follows:
o Position 1 - Offline/damaged status
O The file is offline.
P The file is offline with partial online.
E The file is damaged.
- The file is online.
o Position 2-4 - Archiver attributes
n Never archive the file.
a Archive the file immediately after creation or
modification (see archive(1) to set). Ignore
archive set age times. This attribute remains
set until a different archive command is
issued for the file (see archive(1)).
r The file is scheduled to be re-archived on a
different volume. This attribute is set by
the recycler.
- The attribute is not set.
o Position 5-7 - Releaser attributes
n Never release the file (only the superuser can
set this).
a Release as soon as 1 copy is archived.
p Partially release the file. The first portion
is left on disk after release.
- The attribute is not set.
o Position 8-9 - Stage attributes
n Direct access to removable media (never stage
on read).
a Associatively stage this file.
- The attribute is not set.
o Position 10 - Not used. Always a dash (-).
o Position 11 - Blank space.
o Position 12-14 - Checksum attributes. Set by the
ssum(1) command.
g Generate a checksum value when archiving.
u Checksum the file when staging.
v A valid checksum exists.
- The attribute is not set.
o Position 15-16 - Not used. Always a dash (-).
o Position 17 - Blank space.
o Position 18 - Segment attributes.
s The segment attribute is set.
- The attribute is not set.
o Position 19 - Index and segment attributes.
These attributes do not appear if the segment
attribute (position 17) is not set.
S This is a data segment.
I This is an index for a file segment. Four
additional numbers contained within braces
({}) are written, as follows: {n, o, a, d}.
The numbers within the braces indicate the
following:
n The number of data segments in the
segmented file.
o The number of data segments which are
offline.
a The number of data segments which are
archdone.
d The number of data segments which are
damaged.
- The attribute is not set.
The next four fields indicate the media type for
archive copies 1-4, if present.
Example 1. The sls -2 command generates the following
output for a nonsegmented file:
-rwxrwxrwx 1 smith dev 10876 May 16 09:42 myfile
O----apn-- g-v-- -- lt
The preceding output shows that the file is offline and
has the partial release, release after archive, and
never stage attributes set. It also has the checksum
generate attribute set, and a valid checksum value
exists for the file. The file has copy 1 archived on
lt (digital linear tape).
Example 2. The sls -2 command generates the following
output for a segmented file:
-rwxrwxrwx 1 abc dev 10876 May 16 9:42 yourfile
---------- ----- sI {5,0,0,0} lt
file ...
Specifies a file name or full path name.
EXAMPLES
The following output is obtained from specifying sls -D for
a file archived to disk:
/sam1/testdir0/filea:
mode: -rw-r----- links: 1 owner: root group: other
length: 306581 admin id: 0 inode: 11748.11
project: system(0)
copy 1: ---- Oct 31 13:52 15.0 dk disk01
access: Oct 31 13:50 modification: Oct 31 13:50
changed: Oct 31 13:50 attributes: Oct 31 13:50
creation: Oct 31 13:50 residence: Oct 31 13:50
BUGS
On BSD systems, the -s option reports sizes that are half
the correct values for files that are NFS-mounted from HP-UX
systems. On HP-UX systems, it reports sizes that are twice
the correct values for files that are NFS-mounted from BSD
systems. This is due to a flaw in HP-UX; it also affects
the HP-UX ls(1) program.
SEE ALSO
archive(1), ls(1), release(1), samchaid(1M), schproj(1),
ssum(1), stage(1), tar(1).