installed ports library audit?

Matthew Seaman matthew at FreeBSD.org
Mon Mar 1 15:36:41 UTC 2021


On 01/03/2021 03:43, Gary Aitken wrote:
> I just mostly recovered from a system crash where /usr was corrupted and
> had to be recovered using fsck; couldn't completely recover using the
> journal.
> 
> I suspect the trashed files are in one of a few libraries.  I'm wondering
> if there's an easy way to audit all files installed by given ports,
> i.e. do an sha256 or something like that on each and compare with the known
> good if it's available somewhere?

pkg-check(8) -- specifically `pkg check -r -x .` will show you any file 
known to pkg(8) where the on-disk copy doesn't match the checksum in the 
pkgdb.

	Cheers,

	Matthew


More information about the freebsd-questions mailing list