log files inside the /var/log directory

S

Sergii

Guest
Hello everybody.

I use Oracle Enterprise Linux 6.6 and try to figure out which package owes corresponding log file inside /var/log directory by means of rpm using the script:

#!/bin/bash

for package in `rpm -qa | sort`
do
if [ $(rpm -ql $package | grep /var/log | wc -l) -ne 0 ]
then
echo "$package"
echo "`rpm -ql $package | grep /var/log`"
fi
done


but rpm does not help too much because it does not indicate corresponding package for every log. Just works fine for some files.
 


Many of the log files, syslog, messages, daemon.log, and others in /var/log are not "Owned" by any one package. Certain ones are created by one package, but could me written to by other packages. And yes, some are owned by a single package, or multiple packages that work together and created by the same authors.

This is further complicated by different Distors, having different packages in the package database.

I don't know how this search would be useful.
 

Members online


Latest posts

Top