Mac OS X is a beautiful system, from the mach kernel up to finder and spotlight and speaking of spotlight, it truly blew me away when I just needed to execute this command to get all unix executables and ONLY unix executales:
mdfind "kMDItemKind == 'Unix Executable'"
Amazing!!! Really!!!
Now, the question is does anyone know of an equivalent unix or linux command that doesn't involve complex find incantations or doesn't return false positives (like someone perming all their images rwxrwxrwx ?
Beagle, MetaTracker, Strigi, and even Google Desktop are all desktop indexers for Linux. What's there by default depends on your distribution (some may have none at all), and they all have different tools and interfaces, but the first three support Xesam, so xesam-tool can provide a mdfind
-like command-line interface.
There are 3 ways to go about this under Linux.
You can use the commands locate
, which
, and whereis
to find programs and files matching a pattern on your system.
90% of the executables on a Linux system are either installed under /usr/bin
, /usr/sbin
, /bin
, or /sbin
so it isn't really a mystery what executables are available.
Use find to locate files that have their executable bits set (--x--x--x).
% find . -executable -type f
You could also use your Linux distros' package manager (yum, apt, etc.) to find out what executables are installed for either a given package or all the packages installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With