Hacker News new | ask | show | jobs
by 7kay 1661 days ago
For reference (mostly for me as I need this from time to time), you can do the same on dpkg-based distros with

     $ dpkg -L imagemagick-6.q16 | grep bin
     /usr/bin
     /usr/bin/animate-im6.q16
     /usr/bin/compare-im6.q16
     /usr/bin/composite-im6.q16
     /usr/bin/conjure-im6.q16
     /usr/bin/convert-im6.q16
     /usr/bin/display-im6.q16
     /usr/bin/identify-im6.q16
     /usr/bin/import-im6.q16
     /usr/bin/mogrify-im6.q16
     /usr/bin/montage-im6.q16
     /usr/bin/stream-im6.q16
Similarly, you get

     $ dpkg-query -S /usr/bin/convert-im6.q16 
     imagemagick-6.q16: /usr/bin/convert-im6.q16
This does not work for the canonical executables though as they are just symlinks to /etc/alternatives/foobar
1 comments

> This does not work for the canonical executables though as they are just symlinks to /etc/alternatives/foobar

you can use realpath for this

  dpkg -S $(realpath /usr/bin/convert)
and you can ignore the path to it entirely with

  dpkg -S $(realpath $(which convert))