ls
Quick Reference
Command Name:
ls
Category:
file management
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
- 1
Directory listing
List files and directories in a directory
- 2
File information
Display detailed information about files and directories
- 3
Hidden files
Include hidden files in the listing
- 4
Human-readable sizes
Display sizes in a human-readable format
Syntax
ls [OPTION]... [FILE]...
Options
Option | Description |
---|---|
-l |
Use a long listing format |
-a |
Show hidden entries starting with . |
-h |
Human-readable sizes |
-R |
List subdirectories recursively |
Examples
How to Use These Examples
The examples below show common ways to use the ls
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.