I want to know the commands that a specific Debian package offers me.For example lets say I installed a package called x.deb. This package surely contains some commands that i can use.How to list these commands.I know I can use compgen bash command to generate list of all available commands in my system but what i need is just for specific package.I tried the solutions:dpkg -L postgresql-9.3 | egrep '(bin|games)/'/usr/lib/postgresql/9.3/bin/pg_upgrade/usr/lib/postgresql/9.3/bin/pg_ctl/usr/lib/postgresql/9.3/bin/pg_resetxlog/usr/lib/postgresql/9.3/bin/postgres/usr/lib/postgresql/9.3/bin/pg_xlogdump/usr/lib/postgresql/9.3/bin/initdb/usr/lib/postgresql/9.3/bin/pg_controldata/usr/lib/postgresql/9.3/bin/postmasterI tried the command postgresuser@userPc:~$ postgresNo command 'postgres' found, did you mean: Command 'postgrey' from package 'postgrey' (universe)postgres: command not found
List all commands of a specific Debian package
debian;ubuntu;command line
Use dpkg -L pkgname and pipe it to a grep command searching for bin/ and games/:$ dpkg -L bash | grep -E '(bin|games)/'/bin/bash/usr/bin/bashbug/usr/bin/clear_console/bin/rbashIf you want to check for all binaries regardless if they are in your $PATH try this bash function:find_binaries (){    dpkg -L $@ | while read; do        [ -f $REPLY -a -x $REPLY ] && echo $REPLY    done}Invoke like so:$ find_binaries postfix...SNIP.../usr/lib/postfix/postfix-files/usr/lib/postfix/pipe/usr/lib/postfix/proxymap/usr/lib/postfix/local/usr/lib/postfix/discard...SNIP...