


      LLLLSSSS((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       LLLLSSSS((((1111))))



      NNNNAAAAMMMMEEEE
           ls - list contents of directories

      SSSSYYYYNNNNTTTTAAAAXXXX
           llllssss [ ----aaaaccccddddffffgggghhhhiiiillllmmmmqqqqrrrrssssttttuuuuxxxx1111CCCCFFFFRRRR ] [ _n_a_m_e ] ...

           llll [ options ] [ _n_a_m_e ] ...

           llllxxxx [ options ] [ _n_a_m_e ] ...

           llllffff [ options ] [ _n_a_m_e ] ...

           llllrrrr [ options ] [ _n_a_m_e ] ...

           llllllll [ options ] [ _n_a_m_e ] ...

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           LLLLssss lists the files that are members of the directory _n_a_m_e,
           or lists the file name if _n_a_m_e is a file.  With no _n_a_m_e
           argument, llllssss lists the files in the working directory.
           _O_p_t_i_o_n_s request more detailed information about the
           characteristics of the named directories or files.
           llllxxxx is equivalent to llllssss ----xxxx
           llllffff is equivalent to llllssss ----FFFF
           llllrrrr is equivalent to llllssss ----RRRR
           llllllll is equivalent to llllssss ----llll
           _I_f llllllll _i_s _r_e_d_i_r_e_c_t_e_d _t_o _a _f_i_l_e, _s_u_c_h _a_s llllllll >>>> ffffiiiilllleeeelllliiiisssstttt, _i_t _i_s
           _e_q_u_i_v_a_l_e_n_t _t_o llllssss ----llll.
           llll is equivalent to llllssss ----mmmm

           The output is normally sorted alphabetically by _n_a_m_e.

           Some _O_p_t_i_o_n_s control the format of the listed names.  In the
           simplest case, filenames are listed in vertically-sorted
           columns.
           a    e    i
           b    f    j
           c    g    k
           d    h    l

           The _o_p_t_i_o_n_s are:

           ----llll   (lowercase "L") List each _n_a_m_e in long format, with:
                access mode, number of links, owner, size in bytes,
                time of last modification, and name.

                -rwxrw-rw- 1 bin2756 May 30 15:14 wowzer
                -rw-rw-r-- 1 root304 Jun 14 15:42 yes.1
                -rw-r---w- 1 root593 Jun 14 15:57 zero.1


           ----tttt   Sort by time of last modification (latest first)



      Page 1                                                   (9010-E)






      LLLLSSSS((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       LLLLSSSS((((1111))))



                instead of by name:

                -rw-r---w- 1 root593 Jun 14 15:57 zero.1
                -rw-rw-r-- 1 root304 Jun 14 15:42 yes.1
                -rwxrw-rw- 1 bin2756 May 30 15:14 wowzer


           ----aaaa   Include all names, including the ones which begin with
                a ``.'' or ``..'', which are normally suppressed. ----aaaa is
                a default option for the super-user (rrrrooooooootttt).

           ----ssss   Give size in blocks for each entry. A block is 1024
                bytes even though the minimum storage increment is 4096
                bytes:

                total 68
                    4 docsched
                   12 exmanlist
                    4 getnumber
                   16 goodfor

           ----dddd   If argument is a directory, list only its name, not its
                contents (often used with ----llll to get the status of a
                directory).

           ----rrrr   Reverse the order of sort to get reverse alphabetic or
                oldest first, as appropriate.

           ----uuuu   Use time of last access, instead of last modification,
                for sorting ( ----tttt ) and/or printing ( ----llll ).

           ----cccc   Use time of file creation for sorting (----tttt) and/or
                printing (----llll).

           ----iiii   Print file identifier number in the first column of the
                report for each file listed.

           ----ffff   Force each argument to be interpreted as a directory
                and list the name found in each slot.  This option
                turns off ----llll, ----tttt, ----ssss, and ----rrrr, and turns on ----aaaa; output
                is sorted in the same way as entries appear in the
                directory.

           ----gggg   Give group ID instead of owner ID in a long listing.

           ----mmmm   Force stream output format.

           ----1111   (digit "one") Force one entry per line output format,
                e.g., to a teletype.

           ----CCCC   Force multi-column output (e.g., to a file).




      Page 2                                                   (9010-E)






      LLLLSSSS((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       LLLLSSSS((((1111))))



           ----qqqq   Force printing of non-graphic characters in file names
                as the character ``?''; this normally happens only if
                the output device is a terminal.

           ----hhhh   Force printing of non-graphic characters to be in the
                \ddd notation, in octal.

           ----xxxx   Force columnar printing to be sorted across, rather
                than down ,the page; this is the default if the last
                character of the name by which the program is invoked
                is an ``x''.

           ----FFFF   Cause directories to be marked with a trailing ``/'',
                and executable files to be marked with a trailing '*'.
                This is the default if the last character of the name
                by which the program is invoked is an ``f''.

           ----RRRR   Recursively list subdirectories encountered.

           The mode printed under the ----llll option consists of 11
           characters that are interpreted as follows:

                The first character is:

                     dddd   if the entry is a directory;
                     bbbb   if the entry is a block-type special file;
                     cccc   if the entry is a character-type special file;
                     ----   if the entry is an ordinary file.

                The next 9 characters are interpreted as three sets of
                three bits each.  The first set refers to the owner's
                permissions; the next refers to permissions of others
                in the user-group of the file; and the last refers to
                all others.  Within each set, the three characters
                indicate permission to read, to write, or to execute
                the file as a program, respectively.  For a directory,
                ``execute'' permission is interpreted to mean
                permission to search the directory for a specified
                file.

                The permissions are indicated as follows:

                     rrrr   if the file is readable;
                     wwww   if the file is writable;
                     xxxx   if the file is executable;
                     ----   if the indicated permission is _n_o_t granted.

                The group-execute permission character is given as ssss if
                the file has set-group-ID mode; similarly, the user-
                execute permission character is given as ssss if the file
                has set-user-ID mode.  If the group- or user-execute
                character is ssss,,,, the group- or user-execute character



      Page 3                                                   (9010-E)






      LLLLSSSS((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       LLLLSSSS((((1111))))



                may or may not be set for execution.  In other words,
                the ssss obscures the underlying execute character, which
                may be xxxx or ----.

                When the sizes of the files in a directory are listed a
                total count of blocks is printed.

      FFFFIIIILLLLEEEESSSS
           /etc/passwd
                   to get user IDs for  llllssss ----llll.
           /etc/group
                   to get group IDs for  llllssss ----gggg.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           chmod(1).

      BBBBUUUUGGGGSSSS
           Newline and tab are considered printing characters in file
           names.

           The output device is assumed to be 80 columns wide.

           The option setting based on whether the output is a teletype
           is undesirable since ``ls -s'' is considerably different
           from llllssss ----ssss |||| llllpppprrrr. On the other hand, not using this setting
           would almost certainly be detrimental to old shell scripts
           that use ``ls''.

           Column widths are not good choices for terminals that can
           tab.

























      Page 4                                                   (9010-E)



