man.lsPlain-English help for Unix commands

ls List directory contents

Shows what is in a folder. With no arguments it lists the current directory, one name at a time. Add flags to see sizes, hidden files, dates and who owns what.

Synopsis

ls [OPTION]... [FILE]...

Common options

Option or formWhat it does
-lLong format: permissions, link count, owner, group, size and modification time
-aInclude hidden files (names starting with a dot), plus the . and .. entries
-ALike -a, but leaves out the . and .. entries
-hHuman-readable sizes such as 4.2K or 1.3G. Use it together with -l
-tSort by modification time, newest first
-SSort by size, largest first
-rReverse the sort order
-RList sub-folders recursively
-dList a folder itself instead of its contents

Examples

Everything in the current folder, with details
ls -la
Biggest files first, with readable sizes
ls -lhS
Newest files first
ls -lt
Only the folders in the current directory
ls -d */
docs/
photos/
A folder and everything under it
ls -R docs
Only the JPEG files in a folder
ls photos/*.jpg
photos/a.jpg
photos/b.jpg

Notes

See also

Last reviewed 2026-10-07.