COHERENT manpages

This page displays the COHERENT manpage for ls [List directory's contents].

List of available manpages
Index


ls -- Command

List directory's contents
ls [-abCcdFfgilmnopqRrstux] [file ... ]

The command  ls prints information about each file.  Normally, ls sorts its
output by file  name and prints only the name  of each file. If a directory
name  is  given as  an  argument,  ls sorts  and  lists  its contents,  not
including `.' and `..'.  If no  file is named, ls lists the contents of the
current directory.

The following options control how ls sorts and displays its output:

-a   Print all  directory entries, including  `.', `..', any  hidden files,
     and volume ID's.

-b   Print non-graphic characters in octal.

-C   Print the output in multi-column format, sorted down the columns.

-c   Print the time the files' attributes were last changed.

-d   Treat directories as if they were files.

-F   Print a `/'  after the name of each directory,  and print an `*' after
     each executable file.

-f   Force each argument to be treated as a directory.  This disables the -
     lrst options and sorting, and enables the -a option.

-i   Print the i-number of each file.

-l   Print information  in long  format.  The  fields give mode  bits, link
     count, owner uid, owner gid, size in bytes, date, and  file name.  For
     special files, major and minor device numbers replace the size field.

-m   ``Stream'' the  output horizontally across the  screen, with each file
     name separated by a comma.

-n   Same  as -l,  except the  group identifiers  and user  identifiers are
     numbers rather than names.

-o   Same as -l, except that the group id is not printed.

-p   Print a `/' after each directory name.

-q   Print non-graphics characters as `?'.

-r   Reverse the sense of the sort.

-R   Recursively print directories.

-s   Print the size in blocks of each file.

-t   Sort by time, newest first.

-u   Sort by the access time.

-x   Print multicolumn  output, sorted across the  columns.  This resembles
     the output of the command lc.

The date  ls prints with  the -l and  -t options is  the modification time,
unless the -c or -u option is used as well.

The mode  field in the  long list format  consists of ten  characters.  The
first character will be one of the following:

    -   Regular file
    b   Block special file
    c   Character special file
    d   Directory
    p   Pipe
    x   Bad entry (remove it immediately!)

The remaining  nine characters are permission bits, in  three sets of three
characters each.   The first  set pertains  to the owner  of the  file, the
second to users  from the owner's group, and the  third to users from other
groups.  Each set may contain three characters from the following.

    r   The file can be read
    s   Set effective user ID or group ID on execution
    t   Shared text is sticky
    w   The file can be written
    x   The file is executable
    -   No permission is given

Links

COHERENT includes several commands that are links to ls and its options, to
make it  easier for you  to use the  various features of  ls. The following
table gives each command and the form of ls to which it is linked:

    l   ls -l
    lf  ls -CF
    lr  ls -CR
    lx  ls -x

See Also

chmod,
commands,
l,
lc,
lf,
lr,
lx,
stat