2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-19 03:25:44 +00:00

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.
This commit is contained in:
terminalforlife 2019-11-06 17:36:10 +00:00
parent a7e9bd13e1
commit cddd2c0e11

View File

@ -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. # Use logic and grouping to delete extension-specific files.
find \( -iname "*.jpg" -or -iname "*.sfv" -or -iname "*.xspf" \) -type f -delete 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"