Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

How to check which package a specific file belongs to in FreeBSD - "pkg_info -W"
https://forum.ivorde.com/how-to-check-which-package-a-specific-file-belongs-to-in-freebsd-pkg-info-w-t864.html
Page 1 of 1

Author:  mandrei99 [ Mon Oct 17, 2011 8:39 am ]
Post subject:  How to check which package a specific file belongs to in FreeBSD - "pkg_info -W"

Whenever you need to know what package installed a specific file in FreeBSD, "pkg_info" can be used.

Quote:
-W, --which filename
For the specified filename argument show which package it belongs
to. If the file is not in the current directory, and does not
have an absolute path, then the directories specified in the
environment variable PATH are searched using which(1).



This is how to list files installed by pixman package:
Code:
# pkg_info -L pixman-0.18.4
Information for pixman-0.18.4:

Files:
/usr/local/include/pixman-1/pixman-version.h
/usr/local/include/pixman-1/pixman.h
/usr/local/lib/libpixman-1.a
/usr/local/lib/libpixman-1.la
/usr/local/lib/libpixman-1.so
/usr/local/lib/libpixman-1.so.9
/usr/local/libdata/pkgconfig/pixman-1.pc


And below is how to check which package installed the file "/usr/local/libdata/pkgconfig/pixman-1.pc"
Code:
# pkg_info -W /usr/local/libdata/pkgconfig/pixman-1.pc
/usr/local/libdata/pkgconfig/pixman-1.pc was installed by package pixman-0.18.4

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/