commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Helps to fix permissions when a user clobbers them in their home directory or elsewhere. Does not rely on file extension, but uses the `file` command for context.
Safe for whitespaces in names.
Maybe not clean with big package and too long argument. But return every file who can be executed.
I wanted to view only executables installed by a package. This seemed to work.
There's got to be easier way, please share.
(1) Replace iptables with the package name of your interest
(2) The command will trash any existing environment variable named 'lst'
(3) Instead if you are interested in viewing just .ko or .so files installed by this package, then
that would be easy:
$ dpkg -L iptables | grep "\.[sk]o$"
You may also use the $(which foo) variant instead of backticks. I personnaly have an alias ll='ls -l'.