home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / doc / ls.man < prev    next >
Text File  |  1993-06-13  |  9KB  |  265 lines

  1.  
  2.  
  3.  
  4. LS(1L)                                                     LS(1L)
  5.  
  6.  
  7. NAME
  8.        ls, dir, vdir - list contents of directories
  9.  
  10. SYNOPSIS
  11.        ls  [-abcdfgiklmnpqrstuxABCFGLNQRSUX1] [-w cols] [-T cols]
  12.        [-I pattern] [--all]  [--escape]  [--directory]  [--inode]
  13.        [--kilobytes]  [--numeric-uid-gid]  [--no-group]  [--hide-
  14.        control-chars] [--reverse] [--size] [--width=cols] [--tab-
  15.        size=cols]  [--almost-all] [--ignore-backups] [--classify]
  16.        [--file-type] [--full-time] [--ignore=pattern] [--derefer-
  17.        ence]     [--literal]     [--quote-name]     [--recursive]
  18.        [--sort={none,time,size,extension}]                [--for-
  19.        mat={long,verbose,commas,across,vertical,single-column}]
  20.        [--time={atime,access,use,ctime,status}] [--help]  [--ver-
  21.        sion] [path...]
  22.  
  23. DESCRIPTION
  24.        This manual page documents the GNU version of ls.  dir and
  25.        vdir are versions of ls with different default output for-
  26.        mats.   These  programs  list each given file or directory
  27.        path.  Directory contents are sorted alphabetically.   For
  28.        ls,  files are by default listed in columns, sorted verti-
  29.        cally, if the standard output  is  a  terminal;  otherwise
  30.        they  are  listed  one  per  line.   For dir, files are by
  31.        default listed in columns, sorted vertically.   For  vdir,
  32.        files are by default listed in long format.
  33.  
  34.    OPTIONS
  35.        -a, --all
  36.               List  all files in directories, including all files
  37.               that start with `.'.
  38.  
  39.        -b, --escape
  40.               Quote nongraphic characters  in  file  names  using
  41.               alphabetic and octal backslash sequences like those
  42.               used in C.
  43.  
  44.        -c, --time=ctime, --time=status
  45.               Sort directory contents  according  to  the  files'
  46.               status  change  time  instead  of  the modification
  47.               time.  If the long listing format  is  being  used,
  48.               print the status change time instead of the modifi-
  49.               cation time.
  50.  
  51.        -d, --directory
  52.               List directories  like  other  files,  rather  than
  53.               listing their contents.
  54.  
  55.        -f     Do  not sort directory contents; list them in what-
  56.               ever order they are stored on the disk.   The  same
  57.               as enabling -a and -U and disabling -l, -s, and -t.
  58.  
  59.        --full-time
  60.               List times in full, rather than using the  standard
  61.  
  62.  
  63.  
  64. FSF                     GNU File Utilities                      1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LS(1L)                                                     LS(1L)
  71.  
  72.  
  73.               abbreviation heuristics.
  74.  
  75.        -g     Ignored; for Unix compatibility.
  76.  
  77.        -i, --inode
  78.               Print  the index number of each file to the left of
  79.               the file name.
  80.  
  81.        -k, --kilobytes
  82.               If file sizes are being listed, print them in kilo-
  83.               bytes.   This  overrides  the  environment variable
  84.               POSIXLY_CORRECT.
  85.  
  86.        -l, --format=long, --format=verbose
  87.               In addition to the name of  each  file,  print  the
  88.               file type, permissions, number of hard links, owner
  89.               name, group name, size in bytes, and timestamp (the
  90.               modification time unless other times are selected).
  91.               For files with a time that is more  than  6  months
  92.               old or more than 1 hour into the future, the times-
  93.               tamp contains the year instead of the time of  day.
  94.  
  95.        -m, --format=commas
  96.               List  files  horizontally, with as many as will fit
  97.               on each line, separated by commas.
  98.  
  99.        -n, --numeric-uid-gid
  100.               List the numeric UID and GID instead of the  names.
  101.  
  102.        -p     Append a character to each file name indicating the
  103.               file type.
  104.  
  105.        -q, --hide-control-chars
  106.               Print question marks instead of nongraphic  charac-
  107.               ters in file names.
  108.  
  109.        -r, --reverse
  110.               Sort directory contents in reverse order.
  111.  
  112.        -s, --size
  113.               Print  the  size  of  each file in 1K blocks to the
  114.               left of the file name.  If the environment variable
  115.               POSIXLY_CORRECT  is  set,  512-byte blocks are used
  116.               instead.
  117.  
  118.        -t, --sort=time
  119.               Sort directory contents  by  timestamp  instead  of
  120.               alphabetically, with the newest files listed first.
  121.  
  122.        -u, --time=atime, --time=access, --time=use
  123.               Sort directory contents  according  to  the  files'
  124.               last  access time instead of the modification time.
  125.               If the long listing format is being used, print the
  126.               last  access time instead of the modification time.
  127.  
  128.  
  129.  
  130. FSF                     GNU File Utilities                      2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LS(1L)                                                     LS(1L)
  137.  
  138.  
  139.        -x, --format=across, --format=horizontal
  140.               List the files in columns, sorted horizontally.
  141.  
  142.        -A, --almost-all
  143.               List all files in directories, except for  `.'  and
  144.               `..'.
  145.  
  146.        -B, --ignore-backups
  147.               Do  not  list  files that end with `~', unless they
  148.               are given on the command line.
  149.  
  150.        -C, --format=vertical
  151.               List files in columns, sorted vertically.
  152.  
  153.        -F, --classify
  154.               Append a character to each file name indicating the
  155.               file  type.  For regular files that are executable,
  156.               append a `*'.  The file type indicators are `/' for
  157.               directories, `@' for symbolic links, `|' for FIFOs,
  158.               `=' for sockets, and nothing for regular files.
  159.  
  160.        -G, --no-group
  161.               Inhibit display of group information in a long for-
  162.               mat directory listing.
  163.  
  164.        -L, --dereference
  165.               List  the files linked to by symbolic links instead
  166.               of listing the contents of the links.
  167.  
  168.        -N, --literal
  169.               Do not quote file names.
  170.  
  171.        -Q, --quote-name
  172.               Enclose file names in double quotes and quote  non-
  173.               graphic characters as in C.
  174.  
  175.        -R, --recursive
  176.               List the contents of all directories recursively.
  177.  
  178.        -S, --sort=size
  179.               Sort  directory  contents  by  file size instead of
  180.               alphabetically,  with  the  largest  files   listed
  181.               first.
  182.  
  183.        -U, --sort=none
  184.               Do  not sort directory contents; list them in what-
  185.               ever order they  are  stored  on  the  disk.   This
  186.               option  is  not  called  -f  because the Unix ls -f
  187.               option also enables -a and disables -l, -s, and -t.
  188.               It  seems useless and ugly to group those unrelated
  189.               things together in one option.  Since  this  option
  190.               doesn't do that, it has a different name.
  191.  
  192.  
  193.  
  194.  
  195.  
  196. FSF                     GNU File Utilities                      3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. LS(1L)                                                     LS(1L)
  203.  
  204.  
  205.        -X, --sort=extension
  206.               Sort  directory  contents  alphabetically  by  file
  207.               extension (characters after the  last  `.');  files
  208.               with no extension are sorted first.
  209.  
  210.        -1, --format=single-column
  211.               List one file per line.
  212.  
  213.        -w, --width cols
  214.               Assume  the  screen  is  cols  columns  wide.   The
  215.               default is taken from the terminal driver if possi-
  216.               ble;  otherwise the environment variable COLUMNS is
  217.               used if it is set; otherwise the default is 80.
  218.  
  219.        -T, --tabsize cols
  220.               Assume that each tabstop is cols columns wide.  The
  221.               default is 8.
  222.  
  223.        -I, --ignore pattern
  224.               Do  not list files whose names match the shell pat-
  225.               tern pattern unless they are given on  the  command
  226.               line.   As  in the shell, an initial `.' in a file-
  227.               name does not match a wildcard at the start of pat-
  228.               tern.
  229.  
  230.        --help Print a usage message and exit with a non-zero sta-
  231.               tus.
  232.  
  233.        --version
  234.               Print version information on  standard  error  then
  235.               exit.
  236.  
  237. BUGS
  238.        On  BSD systems, the -s option reports sizes that are half
  239.        the correct values for files that are NFS-mounted from HP-
  240.        UX  systems.   On HP-UX systems, it reports sizes that are
  241.        twice the correct values for files  that  are  NFS-mounted
  242.        from BSD systems.  This is due to a flaw in HP-UX; it also
  243.        affects the HP-UX ls program.
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. FSF                     GNU File Utilities                      4
  263.  
  264.  
  265.