Bash Orientation: LS Spotlight
Use ls and ls -a to inspect visible and hidden items before touching files.
Start Interactive LessonBash 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
- Typing destinations from memory instead of reading real names.
- Forgetting
-awhen hunting for hidden config files. - Moving forward after an empty list without confirming you are in the right directory.
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.