126 lines
4.7 KiB
HTML
126 lines
4.7 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>ls(1)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>ls(1)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
ls - list the contents of a directory
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>ls</STRONG> [<STRONG>-acdfgilqrstu1ACFLMRTX</STRONG>] [<EM>name</EM>...]
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
For each file argument, list it. For each directory argument, list its
|
|
contents. The current working directory is listed when no files are
|
|
named. Information is printed multicolumn on terminals, single column if
|
|
the output is redirected. The options control what information is shown
|
|
and how.
|
|
|
|
<STRONG>Ls</STRONG> has two sources other then the commands line to draw options from, one
|
|
is the environment variable <STRONG>LSOPTS</STRONG> and is used only when the output of <STRONG>ls</STRONG>
|
|
is displayed on a terminal. The other is the name of <STRONG>ls</STRONG> itself. If <STRONG>ls</STRONG>
|
|
is linked to another name, then all the characters after the l are used
|
|
as flags too, except that f, r, t and x are translated to F, R, T and X.
|
|
Useful links are <STRONG>ll</STRONG>, <STRONG>lf</STRONG>, <STRONG>lm</STRONG> and <STRONG>lx</STRONG>.
|
|
|
|
Files whose names start with a dot are by default not listed.
|
|
|
|
Note that standard Minix doesn't have symbolic links or sockets and <STRONG>-u</STRONG>
|
|
and <STRONG>-c</STRONG> are no-ops on a V1 file system, since only modified times are
|
|
stored in V1 inodes.
|
|
|
|
|
|
</PRE>
|
|
<H2>OPTIONS</H2><PRE>
|
|
|
|
<STRONG>-a</STRONG> All entries are listed, even <STRONG>.</STRONG> and <STRONG>..</STRONG>
|
|
|
|
<STRONG>-c</STRONG> Use inode changed time for sorting, listing or searching.
|
|
|
|
<STRONG>-d</STRONG> Do not list contents of directories, but list the directory itself.
|
|
|
|
<STRONG>-f</STRONG> Do not sort (should also be: treat a file as a directory, but that
|
|
can't be implemented portably).
|
|
|
|
<STRONG>-g</STRONG> Suppress the owner name on a long listing (implies <STRONG>-l</STRONG>).
|
|
|
|
<STRONG>-i</STRONG> I-node number printed in first column.
|
|
|
|
<STRONG>-l</STRONG> Long listing: mode, links, owner, group, size and time. (<STRONG>ls</STRONG> <STRONG>-lC</STRONG>
|
|
uses columns in a wide enough window!)
|
|
|
|
<STRONG>-n</STRONG> Print numerical user and group id's.
|
|
|
|
<STRONG>-q</STRONG> Print nongraphic characters as '<STRONG>?</STRONG>' (default on terminals).
|
|
|
|
|
|
|
|
<STRONG>-r</STRONG> Reverse the sort order.
|
|
|
|
<STRONG>-s</STRONG> Give size in kilobytes.
|
|
|
|
<STRONG>-t</STRONG> Sort by time (modified time default), latest first.
|
|
|
|
<STRONG>-u</STRONG> Use last accessed time for sorting, listing or searching.
|
|
|
|
<STRONG>-1</STRONG> Print in one column.
|
|
|
|
<STRONG>-A</STRONG> List all entries, but not <STRONG>.</STRONG> and <STRONG>..</STRONG> (This is the default for
|
|
privileged users.)
|
|
|
|
<STRONG>-C</STRONG> Print multicolumn (default on terminals).
|
|
|
|
<STRONG>-F</STRONG> Mark directories with a '<STRONG>/</STRONG>', executables with a '<STRONG>*</STRONG>', UNIX domain
|
|
sockets with a '<STRONG>=</STRONG>' and symbolic links with a '<STRONG>@</STRONG>' behind the name.
|
|
|
|
<STRONG>-L</STRONG> Print the file referenced by a symbolic link instead of the link.
|
|
|
|
<STRONG>-M</STRONG> List mode before name (implies <STRONG>-C</STRONG>).
|
|
|
|
<STRONG>-R</STRONG> List directory trees recursively.
|
|
|
|
<STRONG>-T</STRONG> Group files by type, i.e. regular files together, directories
|
|
together, etc.
|
|
|
|
<STRONG>-X</STRONG> Print crunched mode and size before name (implies <STRONG>-C</STRONG>). Only the rwx
|
|
permissions that its caller has on the file, but they are in upper
|
|
case if the caller owns the file and has given the permission to the
|
|
callers group or other users. The size is listed in bytes (<= 5K),
|
|
or rounded up kilo, mega or gigabytes.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man1/du.1.html">du(1)</A></STRONG>, <STRONG><A HREF="../man1/stat.1.html">stat(1)</A></STRONG>, <STRONG><A HREF="../man2/stat.2.html">stat(2)</A></STRONG>.
|
|
|
|
|
|
</PRE>
|
|
<H2>BUGS</H2><PRE>
|
|
Having to type <STRONG>ls</STRONG> <STRONG>-C</STRONG> when viewing files through <STRONG><A HREF="../man1/more.1.html">more(1)</A></STRONG>.
|
|
|
|
Is only portable to systems with the same st_mode (see <STRONG><A HREF="../man2/stat.2.html">stat(2)</A></STRONG>).
|
|
|
|
The <STRONG>LSOPTS</STRONG> variable and the <STRONG>-M</STRONG>, <STRONG>-T</STRONG> and <STRONG>-X</STRONG> flags are not found on other <STRONG>ls</STRONG>
|
|
implementations. (They have there own nonstandard flags.)
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHOR</H2><PRE>
|
|
Kees J. Bot (kjb@cs.vu.nl)
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|