Languages
[Edit]
EN

Bash - format date & time from ls command

10 points
Created by:
Theodora-Battle
528

In this short article, we would like to show how to format date and time using ls command in Linux.

Quick solution:

Where:

  • --time-style=long-iso prints date & time in long-iso format (2021-06-24 10:53).
  • -al prints (or just a -l):
    • all files / directories (caused by -a),
    • in list format (caused by -l).

Example output:

Screenshot:

ls command date & time in long-iso format in Bash.
ls command date & time in long-iso format in Bash.

Alternative titles

  1. Bash - ls command with long-iso date & time format
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

Bash - format ls command date & time
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join