GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LS(1) FreeBSD General Commands Manual LS(1)

ls, lc - list contents of directory

ls [ -dlmnpqrstuFQ ] name ...

lc [ -dlmnpqrstuFQ ] name ...

For each directory argument, ls lists the contents of the directory; for each file argument, ls repeats its name and any other information requested. When no argument is given, the current directory is listed. By default, the output is sorted alphabetically by name.

Lc is the same as ls, but sets the -p option and pipes the output through

There are a number of options:

If argument is a directory, list it, not its contents.
List in long format, giving mode (see below), file system type (e.g., for devices, the # code letter that names it; see the instance or subdevice number, owner, group, size in bytes, and time of last modification for each file.
List the name of the user who most recently modified the file.
Don't sort the listing.
Print only the final path element of each file name.
List the qid (see of each file; the printed fields are in the order path, version, and type.
Reverse the order of sort.
Give size in Kbytes for each entry.
Sort by time modified (latest first) instead of by name.
Under -t sort by time of last access; under -l print time of last access.
Add the character / after all directory names and the character * after all executable files.
Print the character t before each file if it has the temporary flag set, and - otherwise.
By default, printed file names are quoted if they contain characters special to The -Q flag disables this behavior.

The mode printed under the -l option contains 11 characters, interpreted as follows: the first character is

if the entry is a directory;
if the entry is an append-only file;
if the entry is a Unix device;
if the entry is a symbolic link;
if the entry is a named pipe;
if the entry is a socket;
-
if the entry is a plain file.

The next letter is l if the file is exclusive access (one writer or reader at a time).

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

if the file is readable;
if the file is writable;
if the file is executable;
-
if none of the above permissions is granted.

/src/cmd/ls.c
/bin/lc


Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.