Back to Blog
Arnošt Havelka

Bash Orientation: LS Spotlight

Use ls and ls -a to inspect visible and hidden items before touching files.

Start Interactive Lesson
Bash Orientation: LS Spotlight

Bash Orientation: LS Spotlight

ls is your visual scanner. It tells you what exists in the current directory so you can choose safe next actions instead of guessing.

Commands to Practice

ls
ls -a

Expected Terminal Signal

A default listing should include core workspace entries, and -a adds hidden entries when they exist:

Documents/
Downloads/
Desktop/
welcome.txt

Why This Matters

Most file mistakes happen because operators skip inspection. A quick ls confirms whether your target exists, whether names are exact, and whether you are about to overwrite the wrong file.

Common Mistakes

Practice Extension

Create a tiny checklist:

pwd
ls
ls -a

Running this before any destructive command (rm, mv, recursive copies) saves time and prevents avoidable cleanup work.

References

These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.

Up Next

Bash Orientation: CD Loop

Practice child and parent directory movement until path changes feel automatic.