home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / test / 19077 < prev    next >
Encoding:
Text File  |  1993-01-23  |  5.5 KB  |  214 lines

  1. Newsgroups: alt.test
  2. Path: sparky!uunet!mcsun!fuug!anon
  3. From: an7447@anon.penet.fi (Voltaire)
  4. Subject: No Subject
  5. Message-ID: <1993Jan23.064922.18723@fuug.fi>
  6. Sender: anon@fuug.fi (The Anon Administrator)
  7. Organization: Anonymous contact service
  8. X-Anonymously-To: alt.test
  9. Date: Thu, 21 Jan 1993 20:43:28 GMT
  10. Lines: 202
  11.  
  12.  
  13.  
  14.  
  15.                                     ls(1)
  16.  
  17.  
  18.  
  19.    Name
  20.      ls    - list and generate statistics for files
  21.  
  22.    Syntax
  23.      ls    [ _o_p_t_i_o_n_s ] _n_a_m_e ...
  24.  
  25.    Description
  26.      For each directory    argument, _l_s lists the contents    of the directory.
  27.      For each file argument, _l_s    repeats    the file name and gives    any other
  28.      information you request with the options available.  By default, the
  29.      list is sorted alphabetically.  When no argument is given,    the current
  30.      directory is listed.  When    several    arguments are given, files are listed
  31.      first, followed by    directories and    the files within each directory.
  32.      Options are listed    below.
  33.  
  34.    Options
  35.  
  36.      -1      Displays one entry per line.    This is    the default when output    is
  37.       not to a terminal.
  38.  
  39.      -a      Displays all entries including those beginning with a    period (.).
  40.  
  41.      -C      Forces multicolumn output for    pipe or    filter.     This is the default
  42.       when the output is to    a terminal.
  43.  
  44.      -c      Uses time of last file status    change (ctime),    reflecting file    crea-
  45.       tion,    mode, etc., for    sorting    (with the -t option) or    printing
  46.       (with    the -l option) rather than the time of file modification or
  47.       access. See also the -t and -u options.
  48.  
  49.      -d      Displays names of directories    only, not contents. Use    this option
  50.       with -l to get the status of a directory.
  51.  
  52.      -F      Marks    directories with trailing slash    (/), sockets with a trailing
  53.       equal    sign (=), symbolic links with a    trailing at sign (@), and
  54.       executable files with    a trailing asterisk (*).
  55.  
  56.      -f      Displays names in the    order they exist in directory. For further
  57.       information, see _d_i_r(5).  Entries beginning with a period (.)    are
  58.       also listed.    This option overrides the -l, -t, -s, and -r options.
  59.  
  60.      -g      Displays assigned group ID (used with    -l only).  Default is
  61.       assigned owner ID.
  62.  
  63.      -i      Displays the i-number    for each file in the first column of the
  64.       report.
  65.  
  66.      -L      Lists    the information, if the    file is    a symbolic link, for the file
  67.       or directory the link    references rather than that for    the link
  68.       itself.
  69.  
  70.      -l      Lists    the mode, number of links, owner, size in bytes, and time of
  71.       last modification (mtime) for    each file.  If the file    is a special
  72.  
  73.  
  74.                                         1
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.    ls(1)
  82.  
  83.  
  84.       file,    the size field contains    the major and minor device numbers
  85.       instead of the size.    If the file is a symbolic link,    the pathname
  86.       of the linked-to file    is printed, preceded by    ``->''.
  87.  
  88.       The mode field consists of 11    characters.  The first character
  89.       indicates the    type of    entry:
  90.  
  91.       d if the entry is a directory
  92.       b if the entry is a block-type special file
  93.       c if the entry is a character-type special file
  94.       l if the entry is a symbolic link
  95.       s if the entry is a socket
  96.       - if the entry is a plain file
  97.  
  98.       The next 9 characters    are interpreted    as three sets of three char-
  99.       acters each.    The first set of three characters refers to file-
  100.       access permissions for the user; the next set, for the user-group;
  101.       and the last set, for    all others.  The permissions are indicated as
  102.       follows:
  103.  
  104.       r if the file    is readable
  105.       w if the file    is writable
  106.       x if the file    is executable
  107.       - if the indicated permission    is not granted.
  108.  
  109.       The group-execute permission character is given as s if the file
  110.       has the set-group-id bit set;    likewise, the user-execute permission
  111.       character is given as    s if the file has the set-user-id bit set.
  112.  
  113.       The last character of    the mode (normally `x' or `-') is t if the
  114.       1000 bit of the mode is on.  See _c_h_m_o_d(2) for    the meaning of this
  115.       mode.     The indications of set-ID and the 01000 bit of    the mode are
  116.       capitalized (S and T,    respectively) if the corresponding execute
  117.       permission is    not set.
  118.  
  119.      -q      Forces the printing of nongraphic characters in file names as    the
  120.       question mark    character (?).    This is    the default when output    is to
  121.       a terminal.
  122.  
  123.      -R      Recursively lists all    subdirectories.
  124.  
  125.      -r      Sorts    entries    in reverse alphabetic or time order.
  126.  
  127.      -s      Displays the size in kilobytes of each file.    This is    the first
  128.       item listed in each entry.
  129.  
  130.      -t      Sorts    by time    modified (most recently    modified first)    instead    of by
  131.       name.    See also the -c    and -u options.
  132.  
  133.      -u      Uses the time    of last    access (atime) instead of last modification
  134.       for sorting (with the    -t option) or printing (with the -l option).
  135.  
  136.  
  137.  
  138.  
  139.  
  140.    2
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.                                     ls(1)
  148.  
  149.  
  150.    Restrictions
  151.      The output    device is assumed to be    80 columns wide.
  152.  
  153.      New line and tab are considered printing characters in file names.
  154.  
  155.      The option    setting    based on whether the output is a teletype is undesir-
  156.      able as "ls -s" is    much different than "ls    -s |lpr".  On the other    hand,
  157.      not doing this setting would make old shell scripts which used ls almost
  158.      certain to    fail.
  159.  
  160.    Files
  161.  
  162.      /_e_t_c/_p_a_s_s_w_d    Used to obtain user    id's for ls -l
  163.  
  164.      /_e_t_c/_g_r_o_u_p        Used to obtain group id's for ls -g
  165.  
  166.    See Also
  167.      stat(2)
  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.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.                                         3
  207.  
  208.  
  209.  
  210. -------------------------------------------------------------------------
  211. To find out more about the anon service, send mail to help@anon.penet.fi.
  212. Due to the double-blind system, any replies to this message will be anonymized,
  213. and an anonymous id will be allocated automatically. You have been warned.
  214.