ls
See what is inside a folder: names, hidden files, sizes and permissions.
>_ Try it: a simulated Linux, right herenothing runs on your computer
Loading the terminal…
Examples
-
ls -
ls -l -
ls -la -
ls -lh -
ls /etc
How it works
ls lists what is in a folder. With no name it shows the folder you are in (pwd tells you which one).
Add -l for the long listing: permissions, owner, size and date for each file. Names that start with a dot are hidden; -a shows them too.
Syntax
ls [OPTION]... [FOLDER]...
Options
| Option | What it does |
|---|---|
-l | long listing: permissions, owner, size, date |
-a | show hidden files (names that start with a dot) |
-h | sizes people can read (4.0K, 1.2M), together with -l |
-1 | one name per line |
Good to know
- Options can be combined:
ls -laisls -l -a. - A line starting with
dinls -lis a folder;-is a file.