home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 May / W2KPRK.iso / apps / posix / source / MAN / LS.PRT < prev    next >
Text File  |  1999-11-17  |  7KB  |  199 lines

  1.                                                            LS (1)
  2.  
  3. NAME
  4.  
  5.   ls - list directory contents.
  6.  
  7. SYNOPSIS
  8.  
  9.   ls [ CFRacdilqrstu1 ] [ file ]
  10. DESCRIPTION
  11.  
  12.   For each operand that names a file of a type other than  direc-
  13. tory,  ls  displays its name as well as any requested, associated
  14. information.  For each operand that names a file of type directo-
  15. ry, ls displays the names of files contained within that directo-
  16. ry, as well as any requested, associated information.
  17.   If no operands are given, the contents of the current directory
  18. are  displayed.  If more than one operand is given, non-directory
  19. operands  are  displayed  first;  directory   and   non-directory
  20. operands are sorted separately and in lexicographical order.
  21.   The following options are available:
  22.      A - List all entries except for [.] and [..] Always set  for
  23.      the super-user.
  24.      C - Force multi-column output; this is the default when out-
  25.      put is to a terminal.
  26.      F - Display a slash (/) immediately after each pathname that
  27.      is  a  directory, an asterisk (*) after each that is execut-
  28.      able, and an at sign (@) after each symbolic link.
  29.      L - If argument is a symbolic link, list the file or  direc-
  30.      tory the link references rather than the link itself.
  31.      R - Recursively list subdirectories encountered.
  32.      T - Display complete time information for the file,  includ-
  33.      ing month, day, hour, minute, second, and year.
  34.      a - Include directory entries whose names begin with  a  dot
  35.      (.).
  36.      c - Use time when file status was last changed  for  sorting
  37.      or printing.
  38.      d - Directories are listed as plain files (not searched  re-
  39.      cursively).
  40.      f - Output is not sorted.
  41.      g - Include the group ownership of the file in a long output
  42.      If  the  group  is not a known group name, the numeric ID is
  43.      printed.
  44.      i - For each file,  print  the  file's  file  serial  number
  45.      (inode number).
  46.      k - Modifies the option, causing the sizes to be reported in
  47.      kilobytes.
  48.      l - (The lowercase letter ``ell.'')  List  in  long  format.
  49.      (See below.) If the output is to a terminal, a total sum for
  50.      all the file sizes is output on a line before the long list-
  51.      ing.
  52.      q - Force printing of non-graphic characters in  file  names
  53.      as  the character `?'; this is the default when output is to
  54.      a terminal.
  55.      r - Reverse the order of the sort  to  get  reverse  lexico-
  56.      graphical order or the oldest entries first.
  57.      s - Display the number of file system bytes actually used by
  58.      each  file, in units of 512, where partial units are rounded
  59.      up to the next integer value.  If the output is to a  termi-
  60.      nal,  a total sum for all the file sizes is output on a line
  61.      before the listing.
  62.      t - Sort by time modified (most recently modified first) be-
  63.      fore sorting the operands by lexicographical order.
  64.      u - Use time of last access, instead of last modification of
  65.      the file for sorting or printing
  66.      1 - (The numeric digit ``one.'')  Force output to be one en-
  67.      try  per  line.  This is the default when output is not to a
  68.      terminal.
  69.   The and options all override each other; the last one specified
  70. determines the format used.
  71.   The and options override each other;  the  last  one  specified
  72. determines the file time used.
  73.   By default, ls lists one entry per line to standard output; the
  74. exceptions are to terminals or when the option is specified.
  75.   File  information  is  displayed  with  one  or  more  <blank>s
  76. separating  the  information associated with the and options.  If
  77. the option is given, the following information is  be  displayed:
  78. file  mode,  number  of links, owner name, number of bytes in the
  79. file, abbreviated month, day-of-month  file  was  last  modified,
  80. hour file last modified, minute file last modified, and the path-
  81. name.
  82.   If the owner name is not a known user name the  numeric  ID  is
  83. displayed.
  84.   If the file is a character special or block special  file,  the
  85. major  and minor device numbers for the file are displayed in the
  86. size field. If the file is a symbolic link the  pathname  of  the
  87. linked-to file is preceded by
  88.   The file mode printed under the -l option consists of  the  the
  89. entry  type, owner permissions, and group permissions.  The entry
  90. type character describes the type of file, as follows:
  91.      b - Block special file.
  92.      c - Character special file.
  93.      d - Directory.
  94.      l - Symbolic link.
  95.      s - Socket link.
  96.      - - Regular file.
  97.   The next three fields are three characters each: owner  permis-
  98. sions,  group permissions, and other permissions.  Each field has
  99. three character positions:
  100.       - If the file is readable; if it is not readable.
  101.       - If the file is writable; if it is not writable.
  102.       - The first of the following that applies:
  103.           S - If in the owner permissions, the file is  not  exe-
  104.           cutable  and  set-user-ID mode is set.  If in the group
  105.           permissions, the file is not executable and  set-group-
  106.           ID mode is set.
  107.           s - If in the owner permissions, the file is executable
  108.           and  set-user-ID  mode is set.  If in the group permis-
  109.           sions, the file is executable and setgroup-ID  mode  is
  110.           set.
  111.           x - The file is executable or the directory is  search-
  112.           able.
  113.           - - The file is neither readable,  writeable,  exectut-
  114.           able,  or  set-user-ID or set-group-ID mode nor sticky.
  115.           (See below.)
  116.        These next two apply only to the third  character  in  the
  117.      last group (other permissions).
  118.           T - The sticky bit is set  (mode  but  not  execute  or
  119.           search permission. (See chmod (1) or sticky (8) .
  120.           t - The sticky bit is set (mode and is  searcheable  or
  121.           executable.  (See chmod (1) or sticky (8) .
  122.   The ls utility exits 0 on success, and >0 if an error occurs.
  123. ENVIRONMENT
  124.  
  125.   The following environment variables affect the execution of ls
  126.       - If this variable contains a string representing a decimal
  127.      integer,  it  is  used  as  the  column  position  width for
  128.      displaying multiple-text-column output.  The ls utility cal-
  129.      culates  how  many pathname text columns to display based on
  130.      the width provided.  (See
  131. SEE ALSO
  132.  
  133.   chmod (1) , sticky (8)
  134. HISTORY
  135.  
  136.   A ls command appeared in
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.