Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I know about rpm, but I am newbie about freebsd packaging system. I learnt about how to create package and know I want learn how to get some information about packages or files. Can somebody give me corresponding freebsd commands of below rpm commands?

rpm -qlp <package> # list files of a package
rpm -qf <file>     # show package name that file belong to
rpm -aq            # show all installed packages
share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Taking nano as an example,

to list package contents, use

pkg_info -L nano-2.2.6

to query owner of a file,

pkg_info -W /usr/local/bin/nano

The last one is easy, just run

pkg_info

share|improve this answer
2  
Just remember that the systems are different, some things just won't have a translation. Learn how to use the FreeBSD system natively (just like they tell you when learning a foreign language: don't translate, think in it). –  vonbrand Feb 16 '13 at 14:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.