From cddd2c0e11305d4092b78f0ce319a01f7d24dfb5 Mon Sep 17 00:00:00 2001 From: terminalforlife Date: Wed, 6 Nov 2019 17:36:10 +0000 Subject: [PATCH] List executable files found in PATH Many uses for this! Say you install a large set of updates, so want to cross-check the old list to the new one, in order to find out which new executables were installed. Or, perhaps less obscure, you might this list, without the `-printf` part, to check their permission and ownership settings. --- sheets/find | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sheets/find b/sheets/find index abe454d..81e089f 100644 --- a/sheets/find +++ b/sheets/find @@ -56,3 +56,6 @@ find . -type f -iname '*.png' -exec bash -c 'mv "$0" "${0%.*}.jpg"' {} \; # Use logic and grouping to delete extension-specific files. find \( -iname "*.jpg" -or -iname "*.sfv" -or -iname "*.xspf" \) -type f -delete + +# List all executable files, by basename, found within PATH. +find ${PATH//:/ } -type f -executable -printf "%P\n"