man uals



  NAME
       uals - list contents of directories

  SYNOPSIS
       uals  [-@abcdefghiklmnopqrstuwxyz
               ABCDEFGIKLMNOPQRSTUVWXYZ1*]
             [-w cols] [-W cols] [-I pattern] [-e format]
             [-y fields |
              --fields={zHDiMtmlogKksbrEduacfZT*A}]
             [--time={atime,access,ctime,change,mtime,modify}]
             [--sum] [--input]
             [--all] [--escape] [--directory] [--inode]
             [--kilobytes] [--numeric-uid-gid] [--no-group]
             [--alpha-uid-gid] [--both-uid-gid]
             [--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]
             [--device] [--mount]
             [--sort={none,time,size,extension}]
             [--format={long,verbose,commas,across,
                vertical,single-column}]
             [--lc_time=format] [--old-time]
             [--o_mode] [--a_mode] [--x_mode]
             [--cray] [--acid] [--count]
             [--type=filetype] [--t_ne=filetype]
             [--s_lt=size] [--s_gt=size] [--size=size]
             [--newer=time|file] [--older=time|file]
             [--new_c=time|file] [--old_c=time|file]
             [--new_u=time|file] [--old_u=time|file]
             [--name=pattern] [--n_ne=pattern]
             [--path=pattern] [--p_ne=pattern]
             [--d_eq=pattern] [--d_eq=pattern]
             [--group=group] [--g_ne=group] [--nogroup]
             [--g_gt=gid] [--g_lt=gid]
             [--user=user] [--u_ne=user] [--nouser]
             [--u_gt=uid] [--u_lt=uid]
             [--mode=modemask] [--m_ne=modemask] [--acl]
             [--or] [--show_filter]
             [--help] [--?] [--version]

            [name...]

  DESCRIPTION
       The uals command is an enhanced ls developed at the
       University of Alaska and grew from 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 | --time=mtime | --time=modify | --time=write
            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.

       --x_mode
              Include permissions (mode) in display, 32bits as
            xfffff.o7777.

       -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 (1000 base).

       -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 | --fields fields
             Display specific fields specified by character:
               zH directory headers
               D  device
               i  inode
               M  type and mode
               t  type
               m  mode
               l  link count
               o  owner
               g  group
               K  size in K|M|G format (1024)
               k  size in k|m|g format (1000)
               s  size in bytes
               b  size in blocks
               r  sum -r file
               Ed modify date/time
               ua usage/access time
               c  change time
               f  filename (default)
               ZT directory totals
               *A all fields (except sum)
             Unlike the default display, directory headers and
            totals are off by default and the 'z' and 'Z' options
            re-enable.  All will include device information (hex).

       -Y | --blocks
              Display block count.
              Blocks are typically defined as 512 bytes but may
            vary by platform.

       -* | --verbose
              Display almost all available information.
              Includes inode (-i), link, modify date, access date,
              change date, and file size as bytes.
              To display device use --device.
              To display sum -r use --sum.

       --mount | --xdev
             Implies -R but will not walk mount points.  Applies
            only to first file system encountered.

       --device
              Display device (hex).

       --input
             Read filenames from stdin.  No filtering of input is
            done.

       --sum
             Include 'sum -r' of file (BSD 4.3 algorithm).
             Only sums regular files.
             Unreadable files displayed as -1.

       --cray
              For Cray specific information (acid and count).

       --acid | -@
              For Cray acid.

       --count
              For Cray reference count.

     UofA Additions|Modifications - find like filtering
       The following options can be used to filter files. By
       default multiple specifications are anded.  They are
       intended to provide file filtering similar to what can be
       done with find.  At this time, only the file|path|directory
       options use pattern matching. The time options for new*|old*
       use either a known file's attributes or a delta from the
       current time (e.g, an absolute date|time is not presently
       supported).  These features can be changed|enhanced as needs
       are identified.

       --type=types
              Display files of specified type(s).
              Either 'f' or '-' may be used for a regular files.
              If ACLs are supported use 'a' for files with ACLs.

       --t_ne=types
              Display files not matching specified type(s).

       --s_lt=SIZE
              Display files less than specified size.
              Use 1k for files less than 1000 bytes
              Use 1K for files less than 1024 bytes.
              Use m|M for mega, g|G for giga, t|T for tera bytes.

       --s_gt=SIZE | --size=SIZE
              Display files greater than specified size.

       --newer=file|time | --0w_m=file|time
              Display files newer (modification) than specified
            file or time offset from current time.  Time
            specification defaults to hours.
              Use 30s for 30 seconds
              Use 30m for 30 minutes.
              Use 10h for 10 hours.
              Use  1w for 1 week.

              Use  1y for 1 year.

       --older=file|time | --d<I>m<I>f<I>ie|time
              Display files older (modification) than specified
            file or time.

       --new_c=file|time
              Display files newer (change) than specified file or
            time.

       --old_c=file|time
              Display files older (change) than specified file or
            time.

       --new_u=file|time
              Display files newer (usage|access) than specified
            file or time.

       --old_u=file|time
              Display files older (usage|access) than specified
            file or time.

       --name=pattern
              Display files with name matching pattern.

       --n_ne=pattern
              Display files with name not matching pattern.
              Unlike --ignore this option is used with other filter
            options.

       --path=pattern
              Display path/file with name matching pattern.

       --p_ne=pattern
              Display path/file with name not matching pattern.

       --d_eq=pattern
              Walk only directories matching specified pattern.

       --d_ne=pattern
              Walk only directories not matching specified pattern.

     UofA Additions|Modifications - file access filters
       The following options filter by file access (permission)
       attributes and honor the --or option.

       --group=group
              Display files belonging to the group.
              Either the name or numeric gid can be specified.

       --g_ne=group
              Display files not belonging to the group or gid.

       --g_gt=gid
              Display files with gid|group greater than specified.

       --g_lt=gid
              Display files with gid|group less than specified.

       --nogroup
              Display files not belonging to any group.

       --user=user
              Display files belonging to the user.
              Either the name or numeric uid can be specified.

       --u_ne=user
              Display files not belonging to the uid or userid.

       --u_gt=uid
              Display files with uid|userid greater than specified.

       --u_lt=uid
              Display files with uid|userid less than specified.

       --nouser
              Display files not belonging to any user.

       --mode=mask
              Display files with mode matching specified mask.
              Note, symlinks are ignored (typically 777).

       --m_ne=mask
              Display files with mode not matching specified mask.

       --acl
              Display files with an ACL (ignores symlinks).

       --or   "or" (vs. "and") file access filtering options.

       --show_filter
              Display filtering options (primarily a debugging
            option).

     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 | --time=change
            Sort directory contents according to the file 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
            Display file sizes in in kilobytes, megabytes,
            gigabytes (base 1000).

       -K | --KILOBYTES
            Display file sizes in in Kilobytes, Megabytes,
            gigabytes (base 1024).

       -l | --format=long | --format=verbose
            In addition to the name of each file, print 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.

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

       --alpha-uid-gid
            Default to list userid and group, use with -n for both
            alpha and numeric forms.

       --both-uid-gid
            Same as --alpha-uid-gid --numeric-uid-gid combined.

       -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 file 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 command line.

       -C | --columns | --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 indicators 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 contents 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 useless and ugly
            to group those unrelated things together in one option.
            Since this option does not 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  for directory
         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
         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

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

       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

       All C source files newer than two weeks:

        kcarlson@iceberg1: uals -RzZ --newer 2w --name "*.c"
        - 0600 kcarlson staff    6584 050321.1059 lib/filemode.c
        - 0600 kcarlson staff     70k 050321.1455 uals/uals.c
        - 0600 kcarlson staff    5816 050321.1408 uals/uals_usage.c

       All files newer than one day:

        ftp1: uals --newer 1d -R -y M
        d 0755  doc
        d 0755  man
        - 0644  uals-v4.24.tar.gz
        l 0777  uals.tgz -> uals-v4.24.tar.gz
        - 0644  doc/ChangeLog_uals.txt
        - 0644  doc/Version_uals.txt
        - 0644  man/uals.html
        - 0644  man/uals.txt

       All files >1.5gb:

        kcarlson@iceberg1: uals/uals --size 1.5g /gpfsa/mksysb
        - 0640 root     ibmman   8.4g 050308.1827 csm.20050308
        - 0640 kcarlson ibmman   1.6g 050308.1639 b1n1.20050308
        - 0640 kcarlson ibmman   1.6g 050308.1640 b1n2.20050308
        Total:        3 files   11.5g size,  for: /gpfsa/mksysb

       All world-writable, unowned, acl present, or sguid files in
       the specified directory (recursively):

        b1n2: uals -R --or --acl --nouser --mode 7002 -y tmog .
        d 0751+ kcarlson staff    tdir.acl
        - 0754+ kcarlson staff    test.acl
        - 6711  kcarlson staff    Test/binX
        d 1777  kcarlson staff    Test/write
        - 0666  kctester tstaccts Test/write/file
        - 0600  1000     1000     Test/write/nowner

  NOTES
       uals has been tested under Digital|Compaq Tru64 v3.2g and
       v4.0b, SGI IRIX 6.2 through 6.5, Cray Unicos 9.0 and 10.0,
       Unicos-mk 2.0, Cray Unicos/MP 2.1, AIX 4.3 through 5.3, and
       NEC SUPER-UX 12.1.  uals has also been tested under Solaris,
       several Linux distributions, Mac OSX, and cygwin (Windows).
       Suggestions for enhancements or bug reports can be directed
       to fnkac@uaf.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.

       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
       implementations which may or may not recognize partial block
       usage.

       Size for megabytes is really 1000 * k-bytes not 1024 * k-
       bytes.  Sizes are displayed with k, m, or g to indicate unit
       base 1000.  Sizes are displayed with K, M, or G to indicate
       unit base 1024.

       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.
       As of v4.0 if acl support has been compiled in an additional
       space will appear after mode bits.  If the file has an acl
       that space will be instead be displayed as a '+'.  You must

       use the operating system display command to see acl
       contents, such as:
         Tru64  getacl  | setacl
         IRIX   ls -lD  | chacl
         UNICOS spget   | spset
         AIX    aclget  | acledit
         Linux  getfacl | setfacl
         SunOS  getfacl | setfacl

  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, aclget(1) AIX,
       getfacl(1) Linux, getacl(1) Tru64.