You are not logged in.
Pages: 1
Hi,
Is there any way to know when I last upgraded my system ?
Thanks Debasish
Last edited by Debasish Patra (2015-06-29 07:25:26)
Keep Calm, And Enjoy Life
Offline
look at the file /var/log/pacman.log. You can also use the following command:
awk '/full system upgrade/ { save=$0 }END{ print save }' /var/log/pacman.log
--edit: or better, to show only the date and time
awk '/full system upgrade/ { dt=$1; tm=$2 } END { print dt,tm }' /var/log/pacman.log
Last edited by mauritiusdadd (2015-06-29 07:38:04)
Offline
Check /var/log/pacman.log
You can also know it package by package by doing :
pacman -Qi package
Last edited by GloW_on_dub (2015-06-29 07:31:14)
Offline
Op may find this small shell script of use .. edit to suit
#!/bin/bash
export DISPLAY=":0.0"
LASTUPD="$(echo -e "Pacman Last Upgraded: " ; cat /var/log/pacman.log | grep upgraded | head -n 1 | cut -c 2-17)"
notify-send -i ~/.icons/pacman3.png "$LASTUPD"
exit
Last edited by cirrus (2015-06-29 15:17:05)
Ancestoral Clan https://cirrus.freevar.com/mclean.html
Offline
I don't think that does what you think it does, cirrus. At the very least you probably want to switch out 'head' for 'tail'.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Wormzy, it seems to work ... but...
grep + head + cut = awk.
cat + grep + head + cut = stupid.
echo + cat + grep + head + cut = stupid and confusing.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Oh, absolutely. As mauritiusdadd's post demonstrates, awk is the way to go.
I was just pointing out to cirrus that their script shows the time of the first package upgrade. At the very least they should use tail, but they'd be better off throwing out the entire pipeline and using awk instead.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Also why does it hardcode DISPLAY when you can simply run the script within X?
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Thanks for the pointers guy's @Alad it shows DISPLAY coz i have it as a 6 hour cronjob on the rpi which has no X.
Ancestoral Clan https://cirrus.freevar.com/mclean.html
Offline
Pages: 1