


LS(1L)                                                     LS(1L)


NNAAMMEE
       ls, dir, vdir - list contents of directories

SSYYNNOOPPSSIISS
       llss  [-abcdfgiklmnpqrstuxABCFGLNQRSUX1] [-w cols] [-T cols]
       [-I pattern] [--all]  [--escape]  [--directory]  [--inode]
       [--kilobytes]  [--numeric-uid-gid]  [--no-group]  [--hide-
       control-chars] [--reverse] [--size] [--width=cols] [--tab-
       size=cols]  [--almost-all] [--ignore-backups] [--classify]
       [--file-type] [--full-time] [--ignore=pattern] [--derefer-
       ence]     [--literal]     [--quote-name]     [--recursive]
       [--sort={none,time,size,extension}]                [--for-
       mat={long,verbose,commas,across,vertical,single-column}]
       [--time={atime,access,use,ctime,status}] [--help]  [--ver-
       sion] [path...]

DDEESSCCRRIIPPTTIIOONN
       This manual page documents the GNU version of llss.  ddiirr and
       vvddiirr are versions of llss with different default output for-
       mats.   These  programs  list each given file or directory
       path.  Directory contents are sorted alphabetically.   For
       llss,  files are by default listed in columns, sorted verti-
       cally, if the standard output  is  a  terminal;  otherwise
       they  are  listed  one  per  line.   For ddiirr, files are by
       default listed in columns, sorted vertically.   For  vvddiirr,
       files are by default listed in long format.

   OOPPTTIIOONNSS
       _-_a_, _-_-_a_l_l
              List  all files in directories, including all files
              that start with `.'.

       _-_b_, _-_-_e_s_c_a_p_e
              Quote nongraphic characters  in  file  names  using
              alphabetic and octal backslash sequences like those
              used in C.

       _-_c_, _-_-_t_i_m_e_=_c_t_i_m_e_, _-_-_t_i_m_e_=_s_t_a_t_u_s
              Sort directory contents  according  to  the  files'
              status  change  time  instead  of  the modification
              time.  If the long listing format  is  being  used,
              print the status change time instead of the modifi-
              cation time.

       _-_d_, _-_-_d_i_r_e_c_t_o_r_y
              List directories  like  other  files,  rather  than
              listing their contents.

       _-_f     Do  not sort directory contents; list them in what-
              ever order they are stored on the disk.   The  same
              as enabling _-_a and _-_U and disabling _-_l_, _-_s_, and _-_t_.

       _-_-_f_u_l_l_-_t_i_m_e
              List times in full, rather than using the  standard



FSF                     GNU File Utilities                      1





LS(1L)                                                     LS(1L)


              abbreviation heuristics.

       _-_g     Ignored; for Unix compatibility.

       _-_i_, _-_-_i_n_o_d_e
              Print  the index number of each file to the left of
              the file name.

       _-_k_, _-_-_k_i_l_o_b_y_t_e_s
              If file sizes are being listed, print them in kilo-
              bytes.   This  overrides  the  environment variable
              POSIXLY_CORRECT.

       _-_l_, _-_-_f_o_r_m_a_t_=_l_o_n_g_, _-_-_f_o_r_m_a_t_=_v_e_r_b_o_s_e
              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 times-
              tamp contains the year instead of the time of  day.

       _-_m_, _-_-_f_o_r_m_a_t_=_c_o_m_m_a_s
              List  files  horizontally, with as many as will fit
              on each line, separated by commas.

       _-_n_, _-_-_n_u_m_e_r_i_c_-_u_i_d_-_g_i_d
              List the numeric UID and GID instead of the  names.

       _-_p     Append a character to each file name indicating the
              file type.

       _-_q_, _-_-_h_i_d_e_-_c_o_n_t_r_o_l_-_c_h_a_r_s
              Print question marks instead of nongraphic  charac-
              ters in file names.

       _-_r_, _-_-_r_e_v_e_r_s_e
              Sort directory contents in reverse order.

       _-_s_, _-_-_s_i_z_e
              Print  the  size  of  each file in 1K blocks to the
              left of the file name.  If the environment variable
              POSIXLY_CORRECT  is  set,  512-byte blocks are used
              instead.

       _-_t_, _-_-_s_o_r_t_=_t_i_m_e
              Sort directory contents  by  timestamp  instead  of
              alphabetically, with the newest files listed first.

       _-_u_, _-_-_t_i_m_e_=_a_t_i_m_e_, _-_-_t_i_m_e_=_a_c_c_e_s_s_, _-_-_t_i_m_e_=_u_s_e
              Sort directory contents  according  to  the  files'
              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.



FSF                     GNU File Utilities                      2





LS(1L)                                                     LS(1L)


       _-_x_, _-_-_f_o_r_m_a_t_=_a_c_r_o_s_s_, _-_-_f_o_r_m_a_t_=_h_o_r_i_z_o_n_t_a_l
              List the files in columns, sorted horizontally.

       _-_A_, _-_-_a_l_m_o_s_t_-_a_l_l
              List all files in directories, except for  `.'  and
              `..'.

       _-_B_, _-_-_i_g_n_o_r_e_-_b_a_c_k_u_p_s
              Do  not  list  files that end with `~', unless they
              are given on the command line.

       _-_C_, _-_-_f_o_r_m_a_t_=_v_e_r_t_i_c_a_l
              List files in columns, sorted vertically.

       _-_F_, _-_-_c_l_a_s_s_i_f_y
              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_, _-_-_n_o_-_g_r_o_u_p
              Inhibit display of group information in a long for-
              mat directory listing.

       _-_L_, _-_-_d_e_r_e_f_e_r_e_n_c_e
              List  the files linked to by symbolic links instead
              of listing the contents of the links.

       _-_N_, _-_-_l_i_t_e_r_a_l
              Do not quote file names.

       _-_Q_, _-_-_q_u_o_t_e_-_n_a_m_e
              Enclose file names in double quotes and quote  non-
              graphic characters as in C.

       _-_R_, _-_-_r_e_c_u_r_s_i_v_e
              List the contents of all directories recursively.

       _-_S_, _-_-_s_o_r_t_=_s_i_z_e
              Sort  directory  contents  by  file size instead of
              alphabetically,  with  the  largest  files   listed
              first.

       _-_U_, _-_-_s_o_r_t_=_n_o_n_e
              Do  not sort directory contents; list them in what-
              ever order they  are  stored  on  the  disk.   This
              option  is  not  called  _-_f  because the Unix llss _-_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
              doesn't do that, it has a different name.





FSF                     GNU File Utilities                      3





LS(1L)                                                     LS(1L)


       _-_X_, _-_-_s_o_r_t_=_e_x_t_e_n_s_i_o_n
              Sort  directory  contents  alphabetically  by  file
              extension (characters after the  last  `.');  files
              with no extension are sorted first.

       _-_1_, _-_-_f_o_r_m_a_t_=_s_i_n_g_l_e_-_c_o_l_u_m_n
              List one file per line.

       _-_w_, _-_-_w_i_d_t_h _c_o_l_s
              Assume  the  screen  is  _c_o_l_s  columns  wide.   The
              default is taken from the terminal driver if possi-
              ble;  otherwise the environment variable CCOOLLUUMMNNSS is
              used if it is set; otherwise the default is 80.

       _-_T_, _-_-_t_a_b_s_i_z_e _c_o_l_s
              Assume that each tabstop is _c_o_l_s columns wide.  The
              default is 8.

       _-_I_, _-_-_i_g_n_o_r_e _p_a_t_t_e_r_n
              Do  not list files whose names match the shell pat-
              tern _p_a_t_t_e_r_n unless they are given on  the  command
              line.   As  in the shell, an initial `.' in a file-
              name does not match a wildcard at the start of _p_a_t_-
              _t_e_r_n_.

       _-_-_h_e_l_p Print  a  usage message on standard output and exit
              successfully.

       _-_-_v_e_r_s_i_o_n
              Print version information on standard  output  then
              exit successfully.

BBUUGGSS
       On  BSD systems, the _-_s option reports sizes that are half
       the correct values for files that are NFS-mounted from HP-
       UX  systems.   On HP-UX systems, it reports sizes that are
       twice the correct values for files  that  are  NFS-mounted
       from BSD systems.  This is due to a flaw in HP-UX; it also
       affects the HP-UX llss program.


















FSF                     GNU File Utilities                      4


