» rpm -qa
Discussing a little on #smart yesterday about providing tab completion to
smart
on the shell (i.e. bash
completion for smart install y<tab>
), I argued it would be difficult because querying the list of all installed packages from RPM is a pretty slow thing.
I stand corrected: Jeff Johnson (aka Mr RPM ;)) reminded me that what is actually slow when doing rpm -qa
is computing the hashes, which can be turned off using the following flags: --nosignature --nodigest
And indeed, the following command is a lot faster (especially when the RPM database files are not cached in memory): rpm -qa --nosignature --nodigest
Too long to type ?
cat <EOF >>/usr/local/bin/rpmqa
#!/bin/sh
exec rpm -qa --nosignature --nodigest "$@"
EOF
chmod 755 /usr/local/bin/rpmqa
rpmqa smart\*
Labels: rpm
0 Comments:
Post a Comment
<< Home