Skip to Content
gnux

-l, --long

Use a long listing format.

An option of lsx.

Usage

lsx -l [FILE]...
lsx --long [FILE]...

Details

ShortLongValueDefaultMeaning
-l--longnoneuse a long listing format

Examples

Long listing including hidden files, with human-readable sizes

lsx -lah

Newest files first, in the long format

lsx -lt /var/log

Largest files first, with sizes in powers of 1000

lsx -lS --si downloads/

Smallest files first (reverse the size sort)

lsx -lShr downloads/

List a directory itself rather than its contents, with ISO timestamps

lsx -ld --time-style=long-iso ~/projects

Long format with numeric user and group IDs, or without the owner or group columns

lsx -n data/ && lsx -g data/ && lsx -o data/ && lsx -lG data/

Sort by last access time (-u) or status change time (-c), showing that time

lsx -ltu cache/ && lsx -lt --time=ctime cache/

Show complete timestamps, or a custom format

lsx --full-time notes.txt && lsx -l --time-style=+%Y-%m-%d notes.txt
lsx -lH current && lsx -lL lib/

List in directory order without sorting, or sort with a word instead of a letter

lsx -U && lsx --sort=size -l

Show the size of each video in megabytes

lsx -l --block-size=M videos

Before committing, see which files in src/ you changed, staged or created, with the files git ignores left out

lsx -l --git --git-ignore src/

Your downloads folder is full: find the biggest folders, each sized by everything in it, with the sizes colored by magnitude

lsx -lS --total-size --only-dirs --color-scale=size ~/Downloads

Page through the colored view, which a pipe would otherwise turn off

lsx -l --pretty=always /etc | less -R

Help in the terminal

gnux help lsx --long

On this page