Explaining ls command options | Generated by AI

Home 2026.04

Question: Explain the ls command options like -l, -h, -c, -u, etc.


Answer:

These flags modify how the Unix/Linux ls command displays file information. Here’s a clear breakdown:

Core Format Option


Size Formatting


Time Display Modifiers

By default, ls -l shows mtime (modification time) — when file content was last changed.

These options change which timestamp is shown:



Common Combinations You Saw


Quick Summary Table

Option Meaning Effect
-l Long format Detailed file info
-h Human-readable Friendly file sizes
-c Change time Show ctime
-u Access time Show atime

Important Concept: mtime vs ctime vs atime


Small Insight (Practical Use)


If you want, I can explain how stat shows all three timestamps in one command (very useful for debugging file changes).


Back Donate