man uals
NAME
uals - list contents of directories
SYNOPSIS
uals [-@abcdfghiklmnopqrstuxzABCDEFGLMNOPQRSTUVXYZ1*]
[-w cols] [-W cols] [-I pattern] [-e format]
[--all] [--escape] [--directory] [--inode]
[--kilobytes] [--numeric-uid-gid] [--no-group]
[--hide-control-chars] [--reverse] [--bytes]
[--width=cols] [--tabsize=cols] [--almost-all]
[--ignore-backups] [--classify] [--file-type]
[--full-time] [--ignore=pattern] [--dereference]
[--literal] [--quote-name] [--recursive]
[--sort={none,time,size,extension}]
[--format={long,verbose,commas,across,vertical,
single-column}]
[--time={atime,access,use,ctime,status}]
[--help] [--?] [--version]
[--lc_time=format] [--o_mode] [--a_mode] [--old-time]
[--cray] [--acid] [--count] [name...]
DESCRIPTION
The uals command is an enhanced ls developed at the University of Alaska
and is based on the GNU fileutils-3.12 distribution.
The default display is a long format similar to ls -l with mode displayed
in octal, size displayed as bytes, kbytes, mbytes or gbytes, and time
displayed in YYMMDD.HHMM format. Specifying any of the following options:
-M, -o, -g, -s, -E will control (limit) what is displayed for each file.
See the examples and notes sections below for further discussion.
OPTIONS
UofA Additions|Modifications
-e | --lc_time format
Define date-time format, defaults to %y%m%d.%H%M
or %y%m%d.%H%M%S for --full-time or --verbose.
The format can also be defined via export LC_TIME=format.
-O | --old-time
Use 'old' (traditional) ls time format.
-g Include group in display.
-o Include owner in display.
-E Include last modify time in display (default).
-M | --o_mode
Include permissions (mode) in display as octal (default).
Use -P | --a_mode for the traditional alpha mode display.
-P | --a_mode
Include permissions (mode) in display in alpha format.
-s | --bytes
Include size in bytes of each file in display.
The default is -k which displays as bytes, kbytes,
mbytes, or gbytes.
-z Do NOT display directory header lines.
-Z Do NOT display total or grand total lines.
-T Display only totals (no file information).
-W | --tabsize cols
Assume that each tabstop is cols columns wide.
The default is 8. This option was '-T' for GNU.
-Y | --blocks
Display block count.
Blocks are typically defined as 512 bytes but may vary by platform.
-* | --verbose
Display all available information.
Includes inode (-i), link, modify date, access date,
change date, and file size as bytes.
--cray
For Cray specific information (acid and count).
--acid | -@
For Cray acid.
--count
For Cray reference count.
Basic (GNU) Options
-a | --all
List all files, including all files starting with '.'.
-b | --escape
Quote nongraphic characters in file names using alphabetic and octal
backslash sequences like those used in C.
-c | --time=ctime | --time=status
Sort directory contents according to the files' status change time
instead of the modification time. If the long listing format is being
used, print the status change time instead of the modification time.
-d | --directory
List directories like other files, rather than listing their contents.
-f Do not sort directory contents; list them in whatever order they are
stored on the disk. The same as enabling -a and -U and disabling -l,
-s, and -t.
--full-time
List times in full, rather than using the standard abbreviation
heuristics.
-h | --help | --?
Print a usage message on standard output and exit successfully.
-i | --inode
Print the index number of each file to the left of the file name.
-k | --kilobytes
If file sizes are being listed, print them in kilobytes. This over-
rides the environment variable POSIXLY_CORRECT.
-l | --format=long | --format=verbose
In addition to the name of each file, print the file type, permis-
sions, 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.
-m | --format=commas
List files horizontally, with as many as will fit on each line,
separated by commas.
-n | --numeric-uid-gid
List the numeric UID and GID instead of the names.
-p Append a character to each file name indicating the file type.
-q | --hide-control-chars
Print question marks instead of nongraphic characters in file names.
-r | --reverse
Sort directory contents in reverse order.
-t | --sort=time
Sort directory contents by timestamp instead of alphabetically, with
the newest files listed first.
-u | --time=atime | --time=access | --time=use
Sort directory contents according to the files' last access time
instead of the modification time. If the long listing format is being
used, print the last access time instead of the modification time.
-x | --format=across | --format=horizontal
List the files in columns, sorted horizontally.
-A | --almost-all
List all files in directories, except for '.' and '..'.
-B | --ignore-backups
Do not list files that end with '~', unless they are given on the com-
mand line.
-C | --format=vertical
List files in columns, sorted vertically.
-F | --classify
Append a character to each file name indicating the file type. For
regular files that are executable, append a '*'. The file type indica-
tors are '/' for directories, '@' for symbolic links, '|' for FIFOs,
`=' for sockets, and nothing for regular files.
-G | --no-group
Inhibit display of group information in long format directory list.
-L | --dereference
List the files linked to by symbolic links instead of listing the con-
tents of the links.
-N | --literal
Do not quote file names.
-Q | --quote-name
Enclose file names in double quotes and quote nongraphic characters as
in C.
-R | --recursive
List the contents of all directories recursively.
-S | --sort=size
Sort directory contents by file size instead of alphabetically, with
the largest files listed first.
-U | --sort=none
Do not sort directory contents; list them in whatever order they are
stored on the disk. This option is not called -f because the Unix ls
-f option also enables -a and disables -l, -s, and -t. It seems use-
less and ugly to group those unrelated things together in one option.
Since this option doesn't do that, it has a different name.
-V | --version
Print version information on standard output then exit successfully.
-X | --sort=extension
Sort directory contents alphabetically by file extension (characters
after the last '.'); files with no extension are sorted first.
-1 | --format=single-column
List one file per line.
-w | --width cols
Assume the screen is cols columns wide. The default is taken from the
terminal driver if possible; otherwise the environment variable
COLUMNS is used if it is set; otherwise the default is 80.
-I | --ignore pattern
Do not list files whose names match the shell pattern pattern unless
they are given on the command line. As in the shell, an initial '.' in
a filename does not match a wildcard at the start of pattern.
DISPLAY
File Mode Designations
d|D for directory, directory with acl.
c for character special
b for block special
M for multiplex (GNU was 'm')
l for symbolic link
s for socket
p for fifo
- for regular
+ for regular with acl
R for Cray checkpoint/restart
m for Cray DMF migrated
o for Cray offline, data
O for Cray offline, no-data
? for any other file type
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 program.
EXAMPLES
Basic command:
snkac@java: uals
- 0640 snkac users 18k 910602.1203 COPYING
- 0640 snkac users 919 971005.0959 ChangeLog
- 0640 snkac users 2106 971005.1102 Makefile
- 0640 snkac users 4607 941027.2049 README.fileutils-3.12
- 0640 snkac users 469 971005.1050 config.h
- 0640 snkac users 6601 971005.0952 config.h.cray
- 0640 snkac users 8737 971004.1921 config.h.cray.org
- 0640 snkac users 6592 971004.1908 config.h.du
- 0640 snkac users 8746 971004.0946 config.h.du.org
- 0640 snkac users 8287 941101.0515 config.h.in
- 0640 snkac users 6598 971011.0851 config.h.irix
- 0640 snkac users 8785 971004.1906 config.h.irix.org
d 0751 snkac users 8192 971026.0820 lib
d 0751 snkac users 8192 971026.0829 man
d 0751 snkac users 8192 971026.0820 src
Totals only and totals recursively:
snkac@java: uals -T
Total: 15 files 109k size, for: .
snkac@java: uals -TR
Total: 15 files 109k size, for: .
Total: 20 files 106k size, for: lib
Total: 5 files 24k size, for: man
Total: 9 files 100k size, for: src
Total: 8 files 41k size, for: src/libx
Total: 7 files 71k size, for: src/org
Grand: 64 files 451k size
Emulation of 'ls -l':
snkac@java: uals src/u*
- 0640 snkac users 14k 971005.1403 src/uadf.c
- 0640 snkac users 54k 971026.0740 src/uals.c
- 0640 snkac users 1097 971011.0853 src/uals.h
Total: 3 files 72k size, for: .
snkac@java: uals -Olps src/u*
- 0640 1 snkac users 13946 14k Oct 5 14:03 src/uadf.c
- 0640 1 snkac users 55790 54k Oct 26 07:40 src/uals.c
- 0640 1 snkac users 1097 1097 Oct 11 08:53 src/uals.h
Total: 3 files 72k size, for: .
Limiting display to mode, modify date, and access date with a custom date-
time format:
snkac@java: uals -e '%y/%m/%d %H:%M:%S' -EuM src/u*
- 0640 97/10/05 14:03:43 a97/10/26 08:22:32 src/uadf.c
- 0640 97/10/26 07:40:46 a97/10/26 08:22:31 src/uals.c
- 0640 97/10/11 08:53:59 a97/10/26 08:22:31 src/uals.h
Total: 3 files 72k size, for: .
Full display (include inode, links, access time, and change time):
snkac@java: uals -* src/uals.c
6343 - 0640 1 snkac users 55790 19971026.074046
a19971026.082231 c19971026.074046 src/uals.c
No headers and no totals, note a list of files including complete relative
path is generated:
snkac@java: uals -Zz */u*
- 0640 snkac users 12k 971026.0836 man/uals.1
- 0640 snkac users 14k 971005.1403 src/uadf.c
- 0640 snkac users 54k 971026.0740 src/uals.c
- 0640 snkac users 1097 971011.0853 src/uals.h
NOTES
uals has been tested under Digital UNIX v3.2g and v4.0b, IRIX 6.2 through
6.5, Unicos 9.0 and 10.0, and Unicos-mk 2.0. Suggestions for enhancements
or bug reports can be directed to dutools@ts.sois.alaska.edu.
uals -OPsl is functionally equivalent to ls -l.
uals -x is functionally equivalent to ls.
uals allows better control of display which is useful for piping results
into other commands. The date-time format is consistantly displayed and
can be easily changed with either the -e | --lc_time format option or by
the LC_TIME environment variable.
Note, uals file type additions for Cray systems include 'm' for dmf
migrated, 'o' for offline with data, 'O' for offline no-data, and 'R' for
checkpoint/restart file. The GNU 'm' for multiplexed has become 'M' due to
the above Cray additions.
The totalling options provide an alternative to the du command. Bear in
mind that uals reports in K-bytes while the units from du depends on system
block size, typically 512 bytes, with some systems 4096 or 8192 bytes. The
total used may not reflect file quota blocks used due to system implementa-
tions which may or may not recognize partial block usage.
Size for megabytes is really 1000 * K-bytes not 1024 * K-bytes. Likewise,
gigabytes is 1,000,000 * K-bytes not 1024 * 1024 * K-bytes. Sizes are
displayed with k, m, or g to indicate unit.
Device minor numbers are displayed with leading 0's to avoid extra white-
space separated fields. The leading 0 does NOT indicate octal value.
The GNU parser allows long options specified as '--option'.
Nominal support for access control lists was added in v2.1. You must use
the operating system display command to see acl contents but the type char-
acter is either forced to uppercase or changed from '-' to '+' to indicate
a file has an associated acl.
ACKNOWLEDGEMENTS
Based on GNU fileutils-3.12 version of ls from Free Software Foundation,
Inc. Revised at the University of Alaska.
RELATED INFORMATION
Commands: ls(1), du(1).
ACLs: spget(1) Unicos[/mk], chacl(1) IRIX, getacl(1) Digital Unix.