As a continuation of Octopi vs Synaptic (https://forum.artixlinux.org/index.php/topic,7729.0.html) post...
Finding out the chronological install or remove date and time of packages is a simple:
~ > grep "installed" /var/log/pacman.log
or
~ > grep "removed" /var/log/pacman.log
Grouping a particular date, never mind the time duration, is what I wanted to point out on the above mentioned thread/discussion.
Example: pacman.log (https://hastebin.com/share/utawafemud.yaml)
or try in on your own logfile.
And say, I just wanted the list of packages installed or upgraded on Jan. 7th.
~ > sed -E '/2025-01-07/!d' /var/log/pacman.log | grep 'installed'
or
~ > sed -E '/2025-01-07/!d' /var/log/pacman.log | grep 'upgraded'
To add to my earlier suggestion of nano, if you press Alt / (forward slash) having opened the log in nano you jump to the end of the file. Ctrl W does a case insensitive search so if you input the date or package name you jump right to it. Alt W searches for the next occurence. Once you know some keyboard shortcuts it's very easy to jump to the right place. Other text editors have similar features.
You could work out some pattern searches and make them into a script or bash alias too, of course.
You're giving me flashbacks! :)
It was probably 1995 when I bought O'Reilly's sed, grep, and awk book. Was writing Oracle stuff on a Data General. :o
I tend to forget that sed even exists.
I get the same vibes even from my local friends whenever I mention ... something retro.
😺I just added to my .bash_aliases the following aliases:
---SNIP---
alias wid='qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.wallpaper 0 | grep "Image: file:" | cut -d "/" -f 3- | rainbow'
alias x='exit'
alias X='cat /dev/null > ~/.bash_history && history -c && exit'
alias xitra='supybot /home/archie/Temporary/xitra/xitra.conf'
pkgin() {
if [ -z "$1" ]; then
echo "Usage: pkgin <date>"
echo "Example: pkgin 2025-01-07"
return 1
fi
sed -E "/$1/!d" /var/log/pacman.log | grep 'installed'
}
pkgrm() {
if [ -z "$1" ]; then
echo "Usage: pkgrm <date>"
echo "Example: pkgrm 2025-01-07"
return 1
fi
sed -E "/$1/!d" /var/log/pacman.log | grep 'removed'
}
pkgup() {
if [ -z "$1" ]; then
echo "Usage: pkgup <date>"
echo "Example: pkgup 2025-01-07"
return 1
fi
sed -E "/$1/!d" /var/log/pacman.log | grep 'upgraded'
}
I should do more of that. Too many useful things, I just don't remember them. If nothing else, an alias file is a nifty ersatz documentation spot.