Check integrity
From FBSD_tips
Check the integrity of all your packages.
pkg_info | awk '{print $1}' | while read P; do pkg_info -g $P; done
Which is funtionally equivalent to :
pkg_info -ga
But you could even make it a bit fancier with headers and separators and log to separate files :
#!/bin/sh
pkg_info | awk '{print $1}' | while read P
do
RES=`pkg_info -g $P 2>&1` &&
(
echo "-------------------" >> pkg.log
echo "$RES" >> pkg.log
echo >> pkg.log
) ||
(
echo "-------------------" >> pkg_error.log
echo "$RES" >> pkg_error.log
echo >> pkg_error.log
)
done
References: pkg_info man page awk man page
Gongo 02:15, 1 October 2007 (UTC)
