encyclopegia.org

Ls

.ls is the Internet country code top-level domain (ccTLD) for Lesotho.

ls is a shell command for listing files including special files such as directories. Originally developed for Unix and later codified by POSIX and Single UNIX Specification, it is supported in many operating systems today, including Unix-like variants, Windows (via PowerShell and UnxUtils), EFI, and MSX-DOS (via MSX-DOS2 Tools). The numerical computing environments MATLAB and GNU Octave include an ls command with similar functionality. An ls command appeared in the first version of AT&T UNIX. The name inherited from Multics and is short for "list". is part of the X/Open Portability Guide since issue 2 of 1987. It was inherited into the first version of POSIX.1 and the Single Unix Specification. In MS-DOS, OS/2, and Windows, the equivalent command is dir . Apple DOS for the Apple II uses . $ 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 Each output line includes a file type letter ('-' for file, 'd' for directory), 9 letters representing permissions, the number of hard links, owning user, owning group, size, modification date, name. In the working directory, the owner fjones has a directory named drafts , a regular file named edition-32 , and an executable named edit.sh which is "old", i.e. modified more than 6 months ago as indicated by the display of the year. ┌─────────── 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 Some implementations support color output to indicate metadata. GNU ls provides the --color option which enables using a database to control colors maintained using dircolors. FreeBSD ls provides the -G option which enables using the termcap database The following example shows possible color output: -rw-r--r-- 1 tsmitt nregion 26650 Dec 20 11:16 audio.ogg brw-r--r-- 1 tsmitt nregion 64 Jan 27 05:52 bd-block-device crw-r--r-- 1 tsmitt nregion 255 Jan 26 13:57 cd-character-device -rw-r--r-- 1 tsmitt nregion 290 Jan 26 14:08 image.png drwxrwxr-x 2 tsmitt nregion 48 Jan 26 11:28 di-directory -rwxrwxr-x 1 tsmitt nregion 29 Jan 26 14:03 ex-executable -rw-r--r-- 1 tsmitt nregion 0 Dec 20 09:39 fi-regular-file lrwxrwxrwx 1 tsmitt nregion 3 Jan 26 11:44 ln-soft-link -> dir lrwxrwxrwx 1 tsmitt nregion 15 Dec 20 10:57 or-orphan-link -> mi-missing-link drwxr-xrwx 2 tsmitt nregion 4096 Dec 20 10:58 ow-other-writeable-dir prw-r--r-- 1 tsmitt nregion 0 Jan 26 11:50 pi-pipe -rwxr-sr-x 1 tsmitt nregion 0 Dec 20 11:05 sg-setgid srw-rw-rw- 1 tsmitt nregion 0 Jan 26 12:00 so-socket drwxr-xr-t 2 tsmitt nregion 4096 Dec 20 10:58 st-sticky-dir -rwsr-xr-x 1 tsmitt nregion 0 Dec 20 11:09 su-setuid -rw-r--r-- 1 tsmitt nregion 10240 Dec 20 11:12 compressed.gz drwxrwxrwt 2 tsmitt nregion 4096 Dec 20 11:10 tw-sticky-other-writeable-dir

References

  1. Native Win32 ports of some GNU utilities . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "Native Win32 ports of some GNU utilities ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "Native Win32 ports of some GNU utilities ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA encyclopegia.org. (2026). Native Win32 ports of some GNU utilities . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  2. [base] Log of /stable/10/bin/ls/ls.c . 2001-12-28. retrieved 2014-11-05 · retrieved 2014-11-04 · rev 1347414139
    Cite this reference

    MLA "[base] Log of /stable/10/bin/ls/ls.c . 2001-12-28. retrieved 2014-11-05." base] Log of /stable/10/bin/ls/ls. 2014-11-04. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "[base] Log of /stable/10/bin/ls/ls.c . 2001-12-28. retrieved 2014-11-05." base] Log of /stable/10/bin/ls/ls. 2014-11-04. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA base] Log of /stable/10/bin/ls/ls. (2014). [base] Log of /stable/10/bin/ls/ls.c . 2001-12-28. retrieved 2014-11-05. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  3. What's New in the Solaris 9 Operating Environment . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "What's New in the Solaris 9 Operating Environment ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "What's New in the Solaris 9 Operating Environment ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA encyclopegia.org. (2026). What's New in the Solaris 9 Operating Environment . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  4. General output formatting (GNU Coreutils 9.1) . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "General output formatting (GNU Coreutils 9.1) ." General output formatting (GNU Coreutils 9. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "General output formatting (GNU Coreutils 9.1) ." General output formatting (GNU Coreutils 9. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA General output formatting (GNU Coreutils 9. (2026). General output formatting (GNU Coreutils 9.1) . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  5. FreeBSD Man Pages — ls . retrieved June 23, 2013 · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "FreeBSD Man Pages — ls . retrieved June 23, 2013." FreeBSD Man Pages — ls. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "FreeBSD Man Pages — ls . retrieved June 23, 2013." FreeBSD Man Pages — ls. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA FreeBSD Man Pages — ls. (2026). FreeBSD Man Pages — ls . retrieved June 23, 2013. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  6. EFI Shells and Scripting . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "EFI Shells and Scripting ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "EFI Shells and Scripting ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA encyclopegia.org. (2026). EFI Shells and Scripting . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  7. MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル . April 1, 1993. · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル . April 1, 1993." MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル . April 1, 1993." MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル. (2026). MSX-DOS2 Tools User's Manual - MSX-DOS2 TOOLS ユーザーズマニュアル . April 1, 1993. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  8. List folder contents - MATLAB ls . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "List folder contents - MATLAB ls ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "List folder contents - MATLAB ls ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA encyclopegia.org. (2026). List folder contents - MATLAB ls . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  9. Function Reference: Ls . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "Function Reference: Ls ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "Function Reference: Ls ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA encyclopegia.org. (2026). Function Reference: Ls . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  10. Multics manual page for ls or list command . 14 February 1985. · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "Multics manual page for ls or list command . 14 February 1985." Multics manual page for ls or list command. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "Multics manual page for ls or list command . 14 February 1985." Multics manual page for ls or list command. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA Multics manual page for ls or list command. (2026). Multics manual page for ls or list command . 14 February 1985. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  11. Fischer, Eric. A Brief History of the 'ls' command . The Linux Documentation Project . retrieved 2022-12-09 · retrieved 2022-12-08 · rev 1347414139
    Cite this reference

    MLA "Fischer, Eric. A Brief History of the 'ls' command . The Linux Documentation Project . retrieved 2022-12-09." Fischer, Eric. 2022-12-08. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "Fischer, Eric. A Brief History of the 'ls' command . The Linux Documentation Project . retrieved 2022-12-09." Fischer, Eric. 2022-12-08. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA Fischer, Eric. (2022). Fischer, Eric. A Brief History of the 'ls' command . The Linux Documentation Project . retrieved 2022-12-09. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  12. Multics programmer's manual - Commands and active functions . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "Multics programmer's manual - Commands and active functions ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "Multics programmer's manual - Commands and active functions ." 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA encyclopegia.org. (2026). Multics programmer's manual - Commands and active functions . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

  13. (decode_switches): -h and -H override output units . coreuti . · retrieved 2026-04-05 · rev 1347414139
    Cite this reference

    MLA "(decode_switches): -h and -H override output units . coreuti ." (decode_switches): -h and -H override output units. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139. Accessed 24 November 2026.

    Chicago "(decode_switches): -h and -H override output units . coreuti ." (decode_switches): -h and -H override output units. 2026-04-05. https://en.wikipedia.org/w/index.php?oldid=1347414139.

    APA (decode_switches): -h and -H override output units. (2026). (decode_switches): -h and -H override output units . coreuti . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1347414139

Cite this article

MLA

"Ls." encyclopegia.org, 2026, https://encyclopegia.org/wiki/ls. Accessed 24 November 2026.

Chicago

"Ls." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/ls.

APA

encyclopegia.org. (2026). Ls. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/ls

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Tar (computing)

enwiki · references available

Cd (command)

enwiki · references available

Mkdir

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1347414139 · 0.5 · snapshot enwiki-001376148303

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.