Show hidden entries and readable file sizes in long format.
ls -lah /var/logList files and folders. Add flags to show hidden files and details.
ls [OPTION]... [FILE]...Show hidden entries and readable file sizes in long format.
ls -lah /var/logSort by newest modification time using an ISO-like date format.
ls -lt --time-style=long-iso| Option / clause | Description |
|---|---|
-a, --all | Include names beginning with a dot. |
-A, --almost-all | Include hidden names, except . and ... |
-l | Use a long listing with permissions, owner, size and time. |
-h, --human-readable | With -l, show sizes in readable units. |
-R, --recursive | List subdirectories recursively. |
-t | Sort by modification time, newest first. |
-r, --reverse | Reverse the selected sort order. |
-S | Sort by file size, largest first. |
-d, --directory | List directories themselves, not their contents. |
-F, --classify | Append a type marker such as / to directories. |
--color[=WHEN] | Control coloured output: always, never or auto. |
--time-style=STYLE | Choose the timestamp format in long listings. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.