Skip to content
CareerBridge
← Linux: navigate with confidence
GUIDED STARTER LESSON

Read a directory listing

Inspect a directory without modifying its contents.

Understand the idea

ls lists directory entries. The -l option asks for a long listing, and -a includes names beginning with a dot.

A name beginning with a dot is conventionally hidden from a basic listing; that does not make it secure.

Listings can reveal private filenames. Use an empty training folder or synthetic output for shared work.

Worked example

This command lists entries, including dot-prefixed names, in the current directory. It does not delete or edit them.

ls -la