Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Ls
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == The following example shows the long form output: <syntaxhighlight lang="console"> $ ls -l drwxr--r-- 1 fjones editors 4096 Mar 2 12:52 drafts -rw-r--r-- 3 fjones editors 30405 Mar 2 12:52 edition-32 -r-xr-xr-x 1 fjones bookkeepers 8460 Jan 16 2022 edit.sh </syntaxhighlight> Each output line includes a file type letter ('-' for file, 'd' for directory), 9 letters representing [[File system permissions#Notation of traditional Unix permissions|permissions]], the number of [[hard link]]s, owning user, owning group, [[file size|size]], modification date, [[filename|name]]. In the working directory, the owner <code>fjones</code> has a directory named <code>drafts</code>, a regular file named <code>edition-32</code>, and an executable named <code>edit.sh</code> which is "old", i.e. modified more than 6 months ago as indicated by the display of the year. <syntaxhighlight lang="console"> ββββββββββββ file (not a directory) |ββββββββββββ read-write (no execution) permissions for the owner |β ββββββββββ read-only permissions for the group |β β ββββββββ read-only permissions for others |β β β βββ 3 hard links |β β β β βββ owning user |β β β β β βββ owning group |β β β β β β βββ file size in bytes |β β β β β β β βββ last modified on |β β β β β β β β βββ filename -rw-r--r-- 3 fjones editors 30405 Mar 2 12:52 edition-32 </syntaxhighlight> Some implementations support color output to indicate metadata. [[GNU]] <code>ls</code> provides the <code>--color</code> option<ref>{{Cite web |title=General output formatting (GNU Coreutils 9.1) |url=https://www.gnu.org/software/coreutils/manual/html_node/General-output-formatting.html |access-date=2023-01-07 |website=www.gnu.org}}</ref> which enables using a database to control colors maintained using dircolors. [[FreeBSD]] <code>ls</code> provides the <code>-G</code> option which enables using the [[termcap]] database<ref>{{cite web |url=http://www.freebsd.org/cgi/man.cgi?query=ls |title=FreeBSD Man Pages — ls |access-date=June 23, 2013 }}</ref> The following example shows possible color output: -rw-r--r-- 1 tsmitt nregion 26650 Dec 20 11:16 <span style="color:dodgerblue ">audio.ogg</span> brw-r--r-- 1 tsmitt nregion 64 Jan 27 05:52 <span style="color:chocolate ">bd-block-device</span> crw-r--r-- 1 tsmitt nregion 255 Jan 26 13:57 <span style="color:chocolate ">cd-character-device</span> -rw-r--r-- 1 tsmitt nregion 290 Jan 26 14:08 <span style="color:magenta ">image.png</span> drwxrwxr-x 2 tsmitt nregion 48 Jan 26 11:28 <span style="color:blue ">di-directory</span> -rwxrwxr-x 1 tsmitt nregion 29 Jan 26 14:03 <span style="color:green ">ex-executable</span> -rw-r--r-- 1 tsmitt nregion 0 Dec 20 09:39 <span style="color:dimgray ">fi-regular-file</span> lrwxrwxrwx 1 tsmitt nregion 3 Jan 26 11:44 <span style="color:dodgerblue ">ln-soft-link</span> -> <span style="color:blue">dir</span> lrwxrwxrwx 1 tsmitt nregion 15 Dec 20 10:57 <span style="color:lightcoral ">or-orphan-link</span> -> <span style="color:white;background:lightcoral">mi-missing-link</span> drwxr-xrwx 2 tsmitt nregion 4096 Dec 20 10:58 <span style="color:blue;background:lime ">ow-other-writeable-dir</span> prw-r--r-- 1 tsmitt nregion 0 Jan 26 11:50 <span style="color:darkgoldenrod ">pi-pipe</span> -rwxr-sr-x 1 tsmitt nregion 0 Dec 20 11:05 <span style="color:black;background:yellow">sg-setgid</span> srw-rw-rw- 1 tsmitt nregion 0 Jan 26 12:00 <span style="color:magenta ">so-socket</span> drwxr-xr-t 2 tsmitt nregion 4096 Dec 20 10:58 <span style="color:white;background:blue ">st-sticky-dir</span> -rwsr-xr-x 1 tsmitt nregion 0 Dec 20 11:09 <span style="color:white;background:red ">su-setuid</span> -rw-r--r-- 1 tsmitt nregion 10240 Dec 20 11:12 <span style="color:red ">compressed.gz</span> drwxrwxrwt 2 tsmitt nregion 4096 Dec 20 11:10 <span style="color:black;background:lime ">tw-sticky-other-writeable-dir</span>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Ls
(section)
Add topic