2020-04-28 17:29:52 +02:00
|
|
|
---
|
2021-09-13 00:48:07 +02:00
|
|
|
title: "Convert a unix timestamp to a readable date"
|
2020-04-28 17:29:52 +02:00
|
|
|
date: 2011-01-06
|
2021-03-11 19:47:26 +01:00
|
|
|
description: the -d flag of the date command combined with @timestamp
|
|
|
|
tags:
|
2021-03-12 18:12:41 +01:00
|
|
|
- toolbox
|
2020-04-28 17:29:52 +02:00
|
|
|
---
|
|
|
|
|
2021-03-11 19:47:26 +01:00
|
|
|
## The trick
|
|
|
|
|
|
|
|
I somehow have a hard time remembering this simple date flags *(probably because I rarely get to practice it), I decided to write it down here :
|
2020-04-28 17:29:52 +02:00
|
|
|
|
2023-04-23 22:33:49 +02:00
|
|
|
```sh
|
2020-04-28 17:29:52 +02:00
|
|
|
$ date -d @1294319676
|
|
|
|
Thu Jan 6 13:14:36 GMT 2011
|
2023-04-23 22:33:49 +02:00
|
|
|
```
|