ls
List directory contents with sorting, filtering, and metadata views.
Synopsis
ls [options] [file|directory]
Core Options
-lLong listing format (permissions, owner, size, time).
-aInclude hidden files.
-hHuman-readable sizes with -l.
-tSort by modification time.
-SSort by size.
-RRecursive listing.
-dList directories themselves, not their contents.
Usage Examples
Long Listing with Hidden Files
Show detailed info for all files, including hidden ones.
ls -laSort by Size
Largest files first.
ls -lSDirectory Only
List directories without expanding them.
ls -d */Recursive Tree
List subdirectories recursively.
ls -RHuman Sizes
Readable file sizes.
ls -lhBuilt for builders.