Last login: Fri 06 Nov 2026 on tty1
Archived edition.
Ten things the page says. Every one of them is on your machine right now — run the command above and check.
List information about the FILEs (the current directory by default).[man]
print C-style escapes for nongraphic characters.[man]
with -l, scale sizes by SIZE when printing them; e.g., '--block-size=M'; see SIZE format below.[man]
with -lt: sort by, and show, ctime (time of last change of file status information); with -l: show ctime and sort by name; otherwise: sort by ctime, newest first.[man]
list directories themselves, not their contents.[man]
generate output designed for Emacs' dired mode.[man]
append indicator (one of */=>@|) to entries WHEN.[man]
across -x, commas -m, horizontal -x, long -l, single-column -1, verbose -l, vertical -C.[man]
group directories before files; can be augmented with a --sort option, but any use of --sort=none (-U) disables grouping.[man]
with -l and -s, print sizes like 1K 234M 2G etc.[man]
Make ls tell the whole truth
The default ls is the least informative ls. These four forms cover most of what you ever need from it.
These commands write files, so run them in a scratch directory:
$ mkdir -p ~/motd-lab && cd ~/motd-lab
$ touch visible.txt .hidden
$ ls
$ ls -a
$ ls -lh --time-style=long-iso
$ ls -lS
WHAT YOU SHOULD SEEPlain ls hides the dotfile. -a reveals it alongside . and .. . -lh gives readable sizes and a sortable date. -lS sorts biggest first.
Five questions, each one taking a term out of a line above. Ten points for each. Tap hear it to have a question read to you; answering plays the verdict.
QUESTION 1 OF 5
Which term completes this line from the page? “List _____ about the FILEs (the current directory by default).”
From point 1 above.
QUESTION 2 OF 5
Which term completes this line from the page? “with -l, scale sizes by SIZE when printing them; e.g., '--_____=M'; see SIZE format below.”
From point 3 above.
QUESTION 3 OF 5
Which term completes this line from the page? “list _____ themselves, not their contents.”
From point 5 above.
QUESTION 4 OF 5
Which term completes this line from the page? “append _____ (one of */=>@|) to entries WHEN.”
From point 7 above.
QUESTION 5 OF 5
Which term completes this line from the page? “group directories before files; can be _____ with a --sort option, but any use of --sort=none (-U) disables grouping.”
From point 9 above.
Answer all five to bank your points.
Five chapters, three voices. Tap one to jump — the player at the bottom of the screen follows.
Know someone with ten minutes and a terminal? Send them today's page. This is the card that appears when you post it:
The Operator has a dispatch on ls(1),
and he files them for subscribers only. It is free.
Join the club, or read about
the series.
MOTD is a weekday reading of one manual page already installed on your own
machine. Every statement is quoted from that page or from the GNU info
documentation beside it, and every edition names the command that shows you
the source.
archive ·
the operator ·
about ·
podcast ·
Feline Union