Commands.app

ls

File Management

List directory contents

Options & Flags
Available options for this command
-l

Use long listing format showing permissions, owner, size, and modification date

-a

Show all files including hidden files (starting with .)

-h

Human-readable file sizes (e.g., 1K, 234M, 2G)

-R

List subdirectories recursively

-t

Sort by modification time, newest first

Examples
Common usage examples

List files in current directory

ls

List all files with detailed information

ls -la

List log files with human-readable sizes

ls -lh /var/log
Notes
  • Hidden files start with a dot (.)
  • Use with grep to filter results: ls -la | grep pattern
Related Commands
You might also find these useful