Feb 25, 2012

Software list for CentOS

This is a rough procedure I use to determine what software is installed on my system, and what has changed.

  1. Create a text file with the list of currently installed software. This is usually best done on a fresh system. This code will also date the file so you can insert it into your scripts:

    sudo rpm -qa > ~/`hostname -s`-software-`date +%Y%m%d`.txt

  2. We can now send ourselves an email of what has been installed on this system (in case the system is compromised):

    mail -s "`hostname -s` Software `date +%Y%m%d`" john@example.com.au < ~/host-software-20111026.txt

  3. We can also compare files to see how our system has changed (for instance, on an update):

    diff host-software-20111026.txt host-software-20111027.txt

No comments:

Post a Comment

Thanks for contributing!! Try to keep on topic and please avoid flame wars!!