UnixDroid

Lesson 4 of 4 · 5 min

ls — listing files

See what is inside a folder, including hidden files.

ls lists what is inside a folder.

ls            # files and folders here
ls -l         # long list: permissions, owner, size, date
ls -a         # also show hidden files (names starting with a dot)
ls -la        # both together
ls -lh        # sizes like 4.0K and 2.1M instead of bytes

Options (the parts starting with -) can be combined: ls -lah is the same as ls -l -a -h.

Hidden files such as .bashrc hold settings. Security testers always run ls -la — interesting things are often hidden.

Try it yourself

Go to your home folder and run ls -la. How many hidden items (starting with .) do you see?

Quick check

Which option makes ls show hidden files?

Need a hint?

A dash and one letter — "all".

Finished this lesson?

Done lessons keep your daily streak going 🔥

0 day streak

0 lessons done

best 0 days

Log in to keep your streak on every device →