WeCodeAcademy

Listing in Detail with ls -l

ls shows names only. Add the flag -l (for "long") to see more: folders start with d, and you also get each file's size in bytes.

Examplebash
Open in editor »
/ $

You can also list a folder without going into it by giving its path.

Examplebash
Open in editor »
/ $
Quick check

What does `ls -l` add to the output?

Your turn: write the code

Create three files a.txt, b.txt and c.txt, then print how many entries ls lists by piping it into wc -l.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.