sls - Lists directory content
sls
[-abcdf]
[--full-time]
[-g]
[--help]
[-hiklmnpqrstu]
[--version]
[-w cols]
[-x]
[-ABCDFG]
[-I pattern]
[-KLNQRS]
[-T cols]
[-UX12]
[-@]
[file …]
SUNWqfs
SUNWsamfs
This man (1) page describes the Oracle extensions to the
GNU version of the ls (1) command.
Oracle modified the ls (1)command and added the following
features to support StorageTek QFS and Oracle HSM software:
-D, which lists a detailed description of each file.
-2, which lists two lines of output for each file.
-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.
The sls (1) command accepts the following options:
-aLists all files in directories. Includes all files that start with
a period (.).
Equivalent to specifying --all.
-bQuotes nongraphic characters in file names using alphabetic and octal
backslash sequences like those used in C.
Equivalent to specifying --escape.
-cSorts 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.
-dLists directories like other files rather than listing their contents.
Equivalent to specifying --directory.
-fDoes 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-timeLists times in full, rather than using the standard abbreviation heuristics.
-gIgnored. For UNIX compatibility.
--helpWrites a usage message to standard output and exits successfully.
-hShows the message-digest hash value of the file if specified with
-D.
-iPrints 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.
-kIf file sizes are being listed, prints them in kilobytes.
This overrides the POSIXLY_CORRECT environment variable.
Equivalent to specifying --kilobytes.
-lIn 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.
-mLists files horizontally, with as many as fit on each line,
separated by commas.
Equivalent to specifying --format=commas.
-nLists the numeric UID and GID instead of the names.
Equivalent to specifying --numeric-uid-gid.
-pSuffixes 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.
-qPrints question marks instead of nongraphic characters in file names.
Equivalent to specifying --hide-control-chars.
-rSorts directory contents in reverse order.
Equivalent to specifying --reverse.
-sPrints 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.
-tSorts directory contents by timestamp instead of alphabetically.
The newest files are listed first.
Equivalent to specifying --sort=time.
-uSorts 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.
--versionWrites version information to standard output and exits successfully.
-w colsAssumes 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.
-xLists the files in columns, sorted horizontally.
Equivalent to specifying --format=across
and --format=horizontal.
-ALists all files in directories, except for those beginning
with a period (.) or two periods (..).
Equivalent to specifying --almost-all.
-BIn the output, suppresses files that end with a
tilde (\s+1~\s-1) unless they are specified on the command line.
Equivalent to specifying --ignore-backups.
-CLists files in columns, sorted vertically.
Equivalent to specifying --format=vertical.
-DUses 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:
StateMeaning
damagedThe file is damaged.
offlineThe file is offline.
archdoneIndicates 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:
AttributeMeaning
archive -nThe file is marked never archive (superuser only).
archive -CThe file is marked for concurrent archiving.
release -nThe file is marked for never release.
release -aThis file is marked for release as soon as 1 copy is made.
release -pThe 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 -nThe file is marked never stage.
stage -aThe file is marked for associative staging.
setfa -DThe file is marked for direct I∕O.
setfa -gnThe file is marked for allocation on stripe group n.
setfa -smThe file is marked for allocation with a stripe width of m.
segment nm stage_ahead xThe 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:
Dash 1 indicates a stale or active entry, as follows:
ContentMeaning
SThe archive copy is stale. This means that the file has been modified, and this archive copy is for a previous version of the file.
UThe copy has been unarchived.
-The archive copy is active and valid.
Dash 2 indicates the archive status, as follows:
ContentMeaning
rThe archiver will rearchive this copy.
-This archive copy will not be rearchived.
Dash 3 is unused.
Dash 4 indicates a damaged, undamaged, or verified status, as follows:
ContentMeaning
DThe archive copy is damaged. This archive copy will not be staged.
VThe 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 (Oracle 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 TypeMeaning
accessTime the file was last accessed.
modificationTime the file was last modified.
changedTime the information in the inode was last changed.
attributesTime that StorageTek QFS or Oracle HSM file system attributes were last changed.
creationTime the file was created.
residenceTime 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 TypeMeaning
modificationStart time for the retention period.
changedTime the retention period was last changed.
attributesThe date the retention period will expire.
retentionThe retention state of the file, active or over.
retention-periodThe 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.
-FSuffixes 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.
-GSuppresses group information in a long format directory listing.
Equivalent to specifying --no-group.
-I patternSuppresses 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.
-KLists all segments for a segmented file.
Must be specified in conjunction with the -2 or -D options.
-LLists the files linked to by symbolic links instead of listing the
content of the links.
Equivalent to specifying --dereference.
-NDoes not quote file names.
Equivalent to specifying --literal.
-QEncloses file names in double quotes and quotes nongraphic characters as
in C.
Equivalent to specifying --quote-name.
-RLists the content of all directories recursively.
Equivalent to specifying --recursive.
-SSorts directory content by file size instead of alphabetically.
The largest files are listed first.
Equivalent to specifying --sort=size.
-T colsAssumes that each tab stop is cols columns wide.
The default is 8.
Equivalent to specifying --tabsize cols.
-UDoes not sort directory content. Content is listed
in the order it is stored in on the disk.
Equivalent to specifying --sort=none.
-XSorts 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.
-@The same as -l, except that extended attribute information overrides ACL information. An @ is displayed after the file permission bits for files that have extended attributes. NOTE: This option is supported only on Solaris.
-1Lists one line per file.
Equivalent to specifying --format=single-column.
-2Lists 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:
\(bu Position 1 - Offline∕damaged status
OThe file is offline.
PThe file is offline with partial online.
EThe file is damaged.
-The file is online.
\(bu Position 2-4 - Archiver attributes
nNever archive the file.
aArchive 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)).
rThe file is scheduled to be re-archived on a different volume. This attribute is set by the recycler.
-The attribute is not set.
\(bu Position 5-7 - Releaser attributes
nNever release the file (only the superuser can set this).
aRelease as soon as 1 copy is archived.
pPartially release the file. The first portion is left on disk after release.
-The attribute is not set.
\(bu Position 8-9 - Stage attributes
nDirect access to removable media (never stage on read).
aAssociatively stage this file.
-The attribute is not set.
\(bu Position 10 - Not used. Always a dash (-).
\(bu Position 11 - Blank space.
\(bu Position 12-14 - Checksum attributes. Set by the ssum (1)
command.
gGenerate a checksum value when archiving.
uChecksum the file when staging.
vA valid checksum exists.
-The attribute is not set.
\(bu Position 15-16 - Not used. Always a dash (-).
\(bu Position 17 - Blank space.
\(bu Position 18 - Segment attributes.
sThe segment attribute is set.
-The attribute is not set.
\(bu Position 19 - Index and segment attributes.
These attributes do not appear if the segment attribute (position 17) is not set.
SThis is a data segment.
IThis 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:
The number of data segments in the segmented file.
The number of data segments which are offline.
The number of data segments which are archdone.
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\09:42 yourfile
---------- ----- sI {5,0,0,0} lt
Specifies a file name or full path name.
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.fT
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.
archive (1),
ls (1),
release (1),
samchaid (1m),
schproj (1),
ssum (1),
stage (1),
tar (1).