
Hi Andrew, On 2013-06-04 19:12, Andrew Spiers wrote:
Is this the best way?
dpkg -L python-docutils | xargs ls -dF | grep \*
Certainly not! parsing ls is almost *always* the wrong answer http://mywiki.wooledge.org/ParsingLs
I used to do
dpkg -L python-docutils | grep bin
Yeah, also not reliable, because some executables may be library-type binaries that are separate binaries but not expected to be called in isolation. These would likely go in *lib/. As an example: mattcen@owen:tmp$ dpkg -L mutt | while read -r file; do test -f "$file" && test -x "$file" && echo "$file"; done /usr/bin/smime_keys /usr/bin/mutt-org /usr/bin/mutt_dotlock /usr/lib/mutt/mailto-mutt /usr/lib/mutt/pgpring /usr/lib/mutt/mailspell /usr/lib/mutt/debian-ldap-query /usr/lib/mutt/pgpewrap /usr/lib/mutt/source-muttrc.d /usr/share/bug/mutt/script Note the above command: This is how I'd find executable files in a package. Note echos files that are (a) a file (as opposed to a directory, link, etc.), and (b) are executable by the current user. See 'help test' for more information.
but it seems this doesn't catch them all.
Also, should all executable files be in bin/ directories according to the Debian packaging guidelines or the filesystem hierarchy standard?
See above. Further, example scripts may live in /usr/share, and these may be executable too.
I couldn't find an answer to that with a quick look.
-- Regards, Matthew Cengia