Table of Contents
wls, wl, wll, wlsf, wlsr, wlsx - list contents of snapshot
wls
[-*1CdEfFIKKKKKlLLmMOprRtuUvVwxXX] [-jpatternList] [-o/Path] [-Wuser[,...]] [-NWorkspaceName]
[-hHost -SSnapshot [-DDir]] [name ...]
wl [ wls options ] [ name ... ]
wll [ wls options ] [ name ... ]
wlsf [ wls options ] [ name ... ]
wlsr [ wls options ] [ name ... ]
wlsx [ wls options ] [ name ... ]
For each directory argument,
wls lists the contents of the directory; for each file argument, wls prints
its name and any other information requested. When no argument is given,
the current directory is listed. The output will be sorted alphabetically,
unless overridden by an option.
There are three major listing formats. The
format chosen depends on the option flags. The default format is to list
the contents of directories in multi-column format, with the entries sorted
down the columns. The -1 (one) option specifies single column format, the
-x option specifies multi-column format, with the entries sorted across the
page, and the -m option specifies stream output format in which files are
listed across the page, separated by commas. In order to determine formatting
for the multi-column formats, wls uses an environment variable, COLUMNS,
to determine the number of character positions available on one output
line. If this variable is not set, the terminfo database is used to determine
the number of columns, based on the environment variable TERM. If this information
cannot be obtained, 80 columns is assumed.
Default options
can be set on most workspace commands. See wco(1)
for details.
The workspace mapping is automatically looked up in the user's workspace
mapping table for the given names. Override this by specifying an explicit
workspace:
- -NworkspaceName
- Use the named workspace mapping.
Or override
with a temporary workspace mapping with these three options:
- -hHost
- Use
the SnapshotCM server on Host for a workspace mapping.
- -SSnapshotPath
- Use
SnapshotPath for a workspace mapping.
- -DWorkspaceDirectory
- The local destination
directory for a workspace mapping. This can be a relative or absolute path.
If this option is not provided with the other two, the local destination
directory defaults to the current directory where the command is executed.
For more information on workspace mappings, see wmap(1)
.
- -*
- Ignore
the workspace ignore filter and display all files and directories. Equivalent
to -j'*|*/'.
- -1 (one)
- The file names will be listed in single column format.
- -C
- Multi-column output with entries sorted down the columns. (default)
- -d
- If
an argument is a directory, list only its name (not its contents); often
used with -l to get the status of a directory. Combine with -R to list all
directories in a hierarchy, but not any files.
- -E
- Filter output to show only
snapshot files also existing in the workspace.
- -f
- Print information as it
is found. Output is unsorted, single column format. This is useful in shell
pipelines as it speeds down stream processing. Otherwise all information
must be gathered before anything can be printed.
- -F
- Put a slash (/) after
each file name if that file is a directory, put an asterisk (*) after
each file name if that file is executable, and put an exclamation point
(!) after each file which is locked. If a file is both executable and locked,
the exclamation point will appear after the asterisk.
- -I
- List only local
files which have been modified since they were checked out. Typically, these
are files awaiting check in. Combine with -L to only show locked and modified
files. Combine with -K to show files which are candidates for import.
- -jpatternList
- List only files whose name (or path) matches patternList. PatternList consists
of one or more patterns separated by a '|' (pipe/or) symbol. Each pattern can
contain shell wild cards as follows:
* - match 0 or more characters
? - match any one character
[set] - match any character in set
[!set] - match any character not in set
A pattern not ending in a slash ('/') matches only files. A pattern ending
in a slash matches only directories. A pattern containing a slash other
than at the end is matched against the full workspace path. Otherwise pattern
is matched against the last component of the path. If patternList begins
with an '!' (exclamation/bang) character, the normal selection is negated.
- -K
- Merge workspace files (and directories) into the normal listing. Normally,
only snapshot files are displayed.
- -KK
- List only workspace files. Ignore snapshot
files for which no local file exists.
- -KKK
- List workspace files which do
not exist in the snapshot. These are candidate files for import.
- -KKKK
- List
snapshot files which do not exist in the workspace.
- -KKKKK
- List files which
exist in both the workspace and the snapshot. Ignore files which exist only
in the workspace or only in the snapshot. Equivalent to -E option.
- -KKKKKK
- List files which exist only in the workspace or only in the snapshot. Ignore
files which exist in both the workspace and the snapshot.
- -l
- List in long
format, giving modes, locks, size of the revision in bytes, and time of
last modification for each file. The first letter of the mode indicates
the storage type of the file (- for files, d for directories). For files,
columns 2 and 3 indicate I/O and keyword expansion modes.
- -L
- List only locked
files. Combine with -I to only show locked and modified files. If long format
is specified with -L, the time shown will be the lock time rather than the
modification time.
- -LL
- Same a -L except lists only files locked in the local
workspace.
- -m
- Stream output format.
- -M
- Print workspace mapping before normal
output.
- -o/Path
- Map /Path in the selected snapshot to the specified (-D) local
directory, creating a temporary, partial workspace mapping for the command.
Normally, the root directory of a snapshot is what is mapped.
- -p
- Put a slash
(/) after each file name if that file is a directory.
- -r
- Reverse the
sort order. This results in reverse alphabetic, or, with the -t option,
the oldest first.
- -R
- Recursively list subdirectories encountered.
- -t
- Sort
by time modified (latest first) instead of by name.
- -u
- Also list files and
directories that can be recovered (undeleted) (see wset(1)
-U).
- -uu
- Only list
files and directories that can be recovered.
- -U
- List mode and time in a numeric
format. Mode is listed as an octal number and time as a decimal number.
- -v
- Show individual item revisions.
- -V
- Print the internal version and exit.
- -w
- Only list files locked by the calling user.
- -Wuser,...
- Only list files locked
by any of the comma separated list of users.
- -x
- Multi-column output with
entries sorted across rather than down the page.
- -X
- List names in expanded
form.
- -XX
- Prefix expanded form names with the full snapshot path. The snapshot
and file paths are separated by a double slash.
wls normally is known by
several names which provide shorthands for the various formats:
wl is equivalent
to wls -m.
wll is equivalent to wls -l.
wlsf is equivalent to wls -F.
wlsr is equivalent to wls -Rf.
wlsx is equivalent to wls -x.
The shorthand notations are implemented as
links to wls on platforms supporting links. Option arguments to the shorthand
versions behave exactly as if the long form above had been used with the
additional arguments given first.
wls uses a mapping to
determine the workspace and snapshot upon which to operate.
An explicit
mapping can be specified with the -N option or with the -S, -h and -D options
together. If no explicit mapping is specified, the user's mapping table is
searched for a workspace containing name. See WORKSPACE MAPPING in wco(1)
for details.
Exit status is 0 if there were no errors, 1 if one
or more files do not exist, and 2 if there was a bad option or network
problem. Error messages will be printed to stderr, normal output will go
to stdout.
The following command prints a long listing of all the
files in the current directory. The file most recently modified (the youngest)
is listed first, then the next youngest file, and so forth, to the oldest.
wls -lt
To list the absolute path of the current archive directory, enter
wls -dX
To list all the locked files in the current workspace in long form,
enter
wll -LLR /
To list all *.vcproj files in the hierarchy, run:
wls -R
-j*.vcproj
To list all files in a workspace, except for those in Release
and Debug directories, run:
wls -R -KK -j'!Release/|Debug/'
To list the /src
directory of a specific snapshot, run:
wls -h host -S /project/.../snapshot
/src
Here is a shell script fragment to check if a file is locked:
if [
"`wls -L ${file} 2>/dev/null`" = "${file}" ]; then
echo ${file} is locked.
fi
wls does not change its output format based on output device.
This differs from the ls( 1) command. Use wls -1 (one) to obtain single
column output.
Unprintable characters in file names may confuse the columnar
output options.
ls( 1), wci(1)
, wco(1)
, wdiff(1)
, whist(1)
, wmap(1)
,
wmerge(1)
, wremove(1)
, wrename(1)
, wset(1)
, wupdate(1)
.
Table of Contents