Dictionary of Meaning
<<Back
Please select a letter:
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z |
0-9
Click here for Shopping
LS
*** Shopping-Tip: LS
{{lowercase|title=ls}}
: ''L
s is also the planetocentric longitude of Sun, see
planetocentric longitude''
'''
ls''' is a command specified by
POSIX and the
Single UNIX Specification, and is thus implemented in
Unix and
Unix-like operating systems.
ls, an abbreviation of '''l'''i'''s'''t, lists files.
History
An ls utility first appeared in Version 5
AT&T Unix UNIX. Its name derives from a similar command in
Multics which meant "list segments". Today, two popular versions of ls include the
Free Software Foundation's (part of the
GNU coreutils package) and the one released by various
Berkeley Software Distribution BSD variants, such as
FreeBSD,
OpenBSD,
NetBSD, and
Apple Computer's
Darwin (operating system) Darwin. Both are
free software and
open source.
Behaviour
Unix and
Unix-like operating systems maintain the idea of a ''current working
directory'', that is, where one is currently positioned in the hierarchy of directories.
ls when invoked without any arguments, lists the files in the current working directory. A directory that is not the current working directory can be specified and
ls will list the files there. User also may specify any list of files and directories. In this case, all files and all contents of specified directories will be listed.
Files whose name starts with "." are not listed, unless -a flag is specified or unless these files are specified explicitly.
Without options,
ls displays files in a bare format. This bare format however makes it difficult to establish the type, permissions, and size of the files. The most common options to reveal this information or change the list of files are:
*
-l: ''l''ong format, displaying permissions, number of
hard links owner, group, size, date, and filename
*
-F appends a character revealing the nature of a file, for example,
* for an executable, or
/ for a directory. Regular files have no suffix.
*
-a lists all files in the given directory, including those whose name starts with "." By default, these files are excluded from the list.
*
-R recursively lists subdirectories. The command
ls -R / would therefore list all files.
In some environments, providing the option
--color (for
GNU ls) or
-G (
FreeBSD ls) behaves akin to
-F but highlights different types of files with different colors.
ls has a large number of other options, as can be discovered in the
Unix manual man page. It is one of the most frequently used tools, and is virtually the ''de''-''facto'' interface to the file system via the
command line.
Sample usage
The following example demonstrates the output of the ls command given two different arguments:
$ pwd
/home/fred
$ ls -l
drwxr--r-- 1 fred editors 4096 drafts
-rw-r--r-- 1 fred editors 30405 edition-32
-r-xr-xr-x 1 fred fred 8460 edit
$ ls -F
drafts/
edition-32
edit*
Here we can see that the user
fred has a directory named
drafts, a regular file called
edition-32, and an executable named
edit in his home directory.
ls uses a special
File system permissions permissions notation that describes what the user, group, and "world" (everyone else) can do to the file. The first character of the permissions line indicates type:
{|class="wikitable"
!style="text-align: left"|Symbol
!style="text-align: left"|Meaning
|-
|
-||Plain file
|-
|
b||
Device node#Block_devices Block device
|-
|
c||
Device node#Character_devices Character device
|-
|
d||
Directory
|-
|
l||
Symbolic link
|-
|
p or
=||
Named pipe or FIFO
|-
|
s||
Socket#Computer_sockets Socket
|-
|}
The rest of the line is split into blocks of three characters each, with the presence of a
r,
w, and
x signifying the ability to read, write, or execute respectively. The first block represents the permissions for the user, the second for the group, and the third for world. For example, the user
fred can read and write the
edition-32 file, but not execute it; members of the group
editors can only read this file and not write or execute it, as can everyone else.
See also
*
chown — Unix command to change the owner of a file
*
chgrp — Unix command to change group of a file
*
User identifier (Unix) User ID
*
Group identifier (Unix) Group ID
*
dir (DOS Command) dir—the command in
DOS that lists files, similar to
ls.
External links
-
ls at the LinuxQuestions.org
wiki.
-
ls.c source code of the AT&T Version 5 UNIX source code.
man pages
-
ls man page (
FreeBSD)
-
ls man page (
GNU ls)
-
ls man page (
OpenBSD)
Category:Unix software
ar:Ls
es:Ls
nl:Ls (Unix)
pt:Ls
ru:Ls
sv:Ls
zh:Ls
'''LS''' may stand for:
*
.ls, the Internet top-level domain for Lesotho
*
Channel Express Air Services (IATA code)
*
Leading Seaman
*
Leading Solution
*
Lexus LS, the flagship, full-size sedan made by Lexus
*
Lincoln LS, a model of car
*
Lincoln-Sudbury Regional High School, a public seconday school in Massachusetts
*
Long snapper, a special teams player in American Football
*
Lost Solution, a Flash group
* Low-power
Schottky diode
*
LS Group, a Korean company which is a spin-off from the LG Group
*
LS Studio, a child modeling agency in Ukraine busted in 2004 under suspicion of Child Pornography.
*
Luxsport, a polish car brand.
*The prefix to the models of sailplane made by
Rolladen-Schneider Flugzeugbau GmbH
{{2LCdisambig}}
fr:LS
ko:LS
nl:Ls
ja:LS
*** Shopping-Tip: LS