2021-04-08 11:26:58 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-08 11:48:34 -05:00
|
|
|
# for RPM-based distros
|
|
|
|
# get detailed installed-packages info
|
2021-04-08 11:26:58 -05:00
|
|
|
|
2021-04-08 11:48:34 -05:00
|
|
|
echo "Getting sorted list of installed pkgs..."
|
2021-04-08 11:26:58 -05:00
|
|
|
date
|
|
|
|
|
2021-04-08 11:48:34 -05:00
|
|
|
time rpm -qa |sort >~/Installedpkgs.list
|
|
|
|
#echo EOF>>~/Installedpkgs.list
|
2021-04-08 11:26:58 -05:00
|
|
|
|
2021-04-08 11:48:34 -05:00
|
|
|
echo "$(date) - Done with sort"
|
2021-04-08 11:26:58 -05:00
|
|
|
|
|
|
|
# Blank it
|
2021-04-08 11:48:34 -05:00
|
|
|
outfile=~/RPMInstalled.list.txt
|
|
|
|
> $outfile
|
2021-04-08 11:26:58 -05:00
|
|
|
|
|
|
|
echo "Querying all installed pkgs for details..."
|
|
|
|
# Do it
|
2021-04-08 11:48:34 -05:00
|
|
|
for i in $(cat ~/Installedpkgs.list); do
|
|
|
|
rpm -qi $i >>$outfile
|
2021-04-08 11:26:58 -05:00
|
|
|
done
|
|
|
|
|
2021-04-08 11:48:34 -05:00
|
|
|
echo "$(date) - Done"
|
2021-04-08 11:26:58 -05:00
|
|
|
#less ~/RPMInstalled.list
|
2021-04-08 11:48:34 -05:00
|
|
|
ls -alh $outfile
|
|
|
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
# 2021.0408 rewrite simpler
|