See how often RPM's are used?

Richardson, Joshua A. Joshua.Richardson at gd-ais.com
Fri Oct 9 16:56:23 UTC 2009


Staying with Yong's suggestion, here's a quick way to script it:

rpm -qa | while read line; do echo $line && rpm -ql $line | while read
line2; do ls -lu $line2; done ; done > rpm_access.txt

Not perfect, but you'd get all the files listed in a txt file quickly
this way.

Joshua A. Richardson
General Dynamics AIS
Principal  Systems Engineer
Systems Administrator
Office: 703-272-1761
Cell: 540-383-9093


-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com] On Behalf Of Yong Huang
Sent: Friday, October 09, 2009 12:08 PM
To: redhat-list at redhat.com
Subject: Re: See how often RPM's are used?

> Is there any good way to see when files from installed RPM's was used?

I can't think of a better way. But if you have not turned off inode
access time update, you can check the files' last access time with ls
-lu <file name>. And the file names are given by rpm -ql <rpm name>. You
can also use find command option -atime instead of ls -lu. If the time
is recent, you know  the rpm the file is in is still used.

Yong Huang


      

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




More information about the redhat-list mailing list