Add first snippet

This commit is contained in:
Daniel_I_Am 2022-06-11 13:23:05 +02:00
parent 84e9c0d6f9
commit 821daeffe6
2 changed files with 11 additions and 6 deletions

View File

@ -1,6 +0,0 @@
---
title: "My First Post"
date: 2022-06-11T11:00:47Z
draft: true
---

View File

@ -0,0 +1,11 @@
---
title: "Seconds since last pacman sync"
date: 2022-05-19T08:45:13Z
draft: false
---
We can echo the result of the current timestamp subtracted from the last edit timestamp in `/var/lib/pacman/local/*/desc`.
```
echo $(expr $(date +%s) - $(grep -rn -A 1 %INSTALLDATE% /var/lib/pacman/local/*/desc | grep -oP '\d{10,}$' | sort | tail -1))
```