Is there any easy way how to determine which package to install if I know which file or file pattern I am looking for? For example I would need startx binary. How to dermine which package(s) will install it?
yum provides "*/startx" would get you what you are looking for. But on FreeBSD the package repos don't contain the same list of every file. If you look at the digests.txz and packagesite.txz files from a repo you only find basic info on the package. Do read the man page with pkg help search to see what you can search for. As a workaround, you can look through your ports collection for the same information in the pkg-plist files for each port. find /usr/ports -name pkg-plist -exec grep --with-filename startx {} \; pkg query %Fn <package_pattern> lists the files that match <package_pattern>. This only for packages in the database (local installed packages). Changing the environment variable PKG_DBDIR you can download (if exists) the repository database and then query in it. Then you can greping the result. This is a guess, this is only a guess.freethread said:pkg query %Fn <package_pattern>lists the files that match <package_pattern>. This only for packages in the database (local installed packages). Changing the environment variable PKG_DBDIR you can download (if exists) the repository database and then query in it. Then you can greping the result. This is a guess, this is only a guess.
A dynamic package list is a package list which is generated at the time the port is compiled based upon the files and directories which are installed. It is not possible to examine it before the source code of the ported application is downloaded and compiled, or after running amake clean.
make clean list...