What if you could see every hidden file and folder detail with one simple command?
Why ls options (-l, -a, -h, -R) in Linux CLI? - Purpose & Use Cases
Imagine you want to see all files in a folder, including hidden ones, and understand their sizes and permissions. You open the folder and try to check each file one by one, guessing what each file is and how big it might be.
Manually opening each file or guessing details is slow and confusing. You might miss hidden files or misunderstand file sizes. It's easy to make mistakes and waste time searching through folders without a clear overview.
The ls command with options like -l, -a, -h, and -R shows all files clearly, including hidden ones, with details like size in human-friendly units, permissions, and even lists files inside subfolders automatically.
open folder look for files try to find hidden files check file sizes by opening each
ls -lahR
You can quickly see all files and folders with clear details, saving time and avoiding mistakes when managing files.
When cleaning up your computer, you want to find large hidden files and understand folder contents. Using ls -lahR helps you spot these files easily and decide what to delete.
ls -l shows detailed info about files.
ls -a shows hidden files too.
ls -h shows sizes in easy-to-read units.
ls -R lists files inside all subfolders.