GNU Info

Info Node: (fileutils.info)What information is listed

(fileutils.info)What information is listed


Next: Sorting the output Prev: Which files are listed Up: ls invocation
Enter node , (file) or (file)node

What information is listed
--------------------------

   These options affect the information that `ls' displays.  By
default, only file names are shown.

`-D'
`--dired'
     With the long listing (`-l') format, print an additional line after
     the main output:

          //DIRED// BEG1 END1 BEG2 END2 ...

     The BEGN and ENDN are unsigned integers that record the byte
     position of the beginning and end of each file name in the output.
     This makes it easy for Emacs to find the names, even when they
     contain unusual characters such as space or newline, without fancy
     searching.

     If directories are being listed recursively (`-R'), output a
     similar line after each subdirectory:
          //SUBDIRED// FORMAT BEG1 END1 ...

     Finally, output a line of the form:
          //DIRED-OPTIONS// --quoting-style=WORD
     where WORD is the quoting style (Note: Formatting the file
     names).

`-G'
`--no-group'
     Inhibit display of group information in a long format directory
     listing.  (This is the default in some non-GNU versions of `ls',
     so we provide this option for compatibility.)

`-h'
`--human-readable'
     Append a size letter such as `M' for megabytes to each size.
     Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes.
     Use the `--si' option if you prefer powers of 1000.

`-H'
`--si'
     Append a size letter such as `M' for megabytes to each size.  (SI
     is the International System of Units, which defines these letters
     as prefixes.)  Powers of 1000 are used, not 1024; `M' stands for
     1,000,000 bytes.  Use the `-h' or `--human-readable' option if you
     prefer powers of 1024.

     Warning: the meaning of `-H' will change in the future to conform
     to POSIX.  Use `--si' for the old meaning.

`-i'
`--inode'
     Print the inode number (also called the file serial number and
     index number) of each file to the left of the file name.  (This
     number uniquely identifies each file within a particular
     filesystem.)

`-l'
`--format=long'
`--format=verbose'
     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 (by default, the modification time).  For
     files with a time more than six months old or in the future, the
     timestamp contains the year instead of the time of day.  If the
     timestamp contains today's date with the year rather than a time
     of day, the file's time is in the future, which means you probably
     have clock skew problems which may break programs like `make' that
     rely on file times.

     For each directory that is listed, preface the files with a line
     `total BLOCKS', where BLOCKS is the total disk allocation for all
     files in that directory.  The block size currently defaults to 1024
     bytes, but this can be overridden (Note: Block size).  The
     BLOCKS computed counts each hard link separately; this is arguably
     a deficiency.

     The permissions listed are similar to symbolic mode specifications
     (Note: Symbolic Modes).  But `ls' combines multiple bits into the
     third character of each set of permissions as follows:
    `s'
          If the setuid or setgid bit and the corresponding executable
          bit are both set.

    `S'
          If the setuid or setgid bit is set but the corresponding
          executable bit is not set.

    `t'
          If the sticky bit and the other-executable bit are both set.

    `T'
          If the sticky bit is set but the other-executable bit is not
          set.

    `x'
          If the executable bit is set and none of the above apply.

    `-'
          Otherwise.

     Following the permission bits is a single character that specifies
     whether an alternate access method applies to the file.  When that
     character is a space, there is no alternate access method.  When it
     is a printing character (e.g., `+'), then there is such a method.

`-o'
     Produce long format directory listings, but don't display group
     information.  It is equivalent to using `--format=long' with
     `--no-group' .  This option is provided for compatibility with
     other versions of `ls'.

`-s'
`--size'
     Print the disk allocation of each file to the left of the file
     name.  This is the amount of disk space used by the file, which is
     usually a bit more than the file's size, but it can be less if the
     file has holes.

     Normally the disk allocation is printed in units of 1024 bytes,
     but this can be overridden (Note: Block size).

     For files that are NFS-mounted from an HP-UX system to a BSD
     system, this option reports sizes that are half the correct
     values.  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 `ls'
     program.


automatically generated by info2www version 1.2.2.9