Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Tue Jun 06, 2023 8:36 am


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - How to check which package a specific file belongs to in FreeBSD - "pkg_info -W"
Author Message
Post subject: How to check which package a specific file belongs to in FreeBSD - "pkg_info -W"  |  Post Posted: Mon Oct 17, 2011 8:39 am
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
Jump to:  
cronNews News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO