1 2 3 4
#!/bin/sh rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \ | sort > /var/log/rpmpkgs