pkg-provides: useful pkgng plugin for querying which package provides a particular file reddit / BSD ---------------------------------------------------------------------- MaxPayneNoir · 2018-04-19 14:06 For FreeBSD/DragonflyBSD users, this looks like a nice feature pkgng was still missing; the plugin itself was first committed by the author in late 2017 ---------------------------------------------------------------------- deeperblue1 · 2018-04-20 06:50 It's available as a port: [ports-mgmt/pkg- provides](https://www.freshports.org/ports-mgmt/pkg-provides) ---------------------------------------------------------------------- MaxPayneNoir · 2018-04-20 08:05 Thanks; I noticed it meanwhle but was too late ;). By the way, it's incredible how, after years, I had never hard about pkg plugins and only came to notice them though DragonflyBSD Digest ---------------------------------------------------------------------- dlangille · 2018-04-20 10:33 On FreeBSD, we use ‘pkg which’. How is pkg-provides different ? ---------------------------------------------------------------------- deeperblue1 · 2018-04-21 07:24 `pkg which` requires you to have the package installed. `pkg provides` uses a database of files a package would install e.g. you could use it to search for all packages that *provide* files ending with `bin/vim`: $ pkg provides 'bin/vim$' Name : vim-8.0.1655 Desc : Improved version of the vi editor Repo : FreeBSD Filename: /usr/local/bin/vim Name : vim-console-8.0.1655 Desc : Improved version of the vi editor (console only) Repo : FreeBSD Filename: /usr/local/bin/vim Name : vim-tiny-8.0.1655 Desc : Improved version of the vi editor (vim binary only) Repo : FreeBSD Filename: /usr/local/bin/vim ---------------------------------------------------------------------- dlangille · 2018-04-21 10:29 Wow. That should be in the README. ---------------------------------------------------------------------- Kernigh · 2018-04-23 02:30 OpenBSD's `pkg_add pkglocatedb` does almost the same thing, but I must pipe to `grep` to use regular expressions. $ pkg_locate irb | grep '/[^./]*irb[^\./]*$' aircrack-ng-1.1p13:security/aircrack-ng:/usr/local/sbin/airbase-ng jruby-9.1.14.0:lang/jruby:/usr/local/jruby/bin/jirb jruby-9.1.14.0:lang/jruby:/usr/local/jruby/bin/jirb_swing logstash- 2.4.0p2v0:sysutils/logstash:/usr/local/logstash/vendor/jruby/bin/irb logstash- 2.4.0p2v0:sysutils/logstash:/usr/local/logstash/vendor/jruby/bin/jirb logstash- 2.4.0p2v0:sysutils/logstash:/usr/local/logstash/vendor/jruby/bin/jirb_ swing mruby-1.3.0:lang/mruby:/usr/local/bin/mirb ruby-2.3.6p0:lang/ruby/2.3,-main:/usr/local/bin/irb23 ruby-2.4.3p0:lang/ruby/2.4,-main:/usr/local/bin/irb24 ruby-2.5.0p1:lang/ruby/2.5,-main:/usr/local/bin/irb25 ruby24-origami- 2.1.0:security/origami,ruby24:/usr/local/lib/ruby/gems/2.4/gems/origam i-2.1.0/bin/shell/irbrc ruby24-pygments.rb-0.6.3p1v0:textproc/ruby-pygments.rb,ruby24:/usr /local/lib/ruby/gems/2.4/gems/pygments.rb-0.6.3/vendor/pygments- main/tests/examplefiles/irb_heredoc ---------------------------------------------------------------------- MaxPayneNoir · 2018-04-23 08:46 nice thanks for pointing out ;)