How to beautify date command's output (show date in number format)¶
The default date format¶
After running date
command on terminal, the output looks like:
Sat Apr 15 18:21:25 CST 2023
Show date in number format¶
Use the following command to make the date more readable:
date +"%Y-%m-%d %H:%M"
The output now looks like:
2023-04-15 18:21
This article is originally created by tooli.top. Please indicate the source when reprinting : https://www.tooli.top/posts/beautify_date
Posted on 2023-04-15
Mail to author