Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Last active October 18, 2022 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshCheek/6ab5ba5a3b2337cc3b487cb89fe22843 to your computer and use it in GitHub Desktop.
Save JoshCheek/6ab5ba5a3b2337cc3b487cb89fe22843 to your computer and use it in GitHub Desktop.
How to get the same output as "detect" from bash
# https://twitter.com/inanna_malick/status/1582121657228922880
# files executable by the current user, with "detect" in the filename
# or files with a ".rs" extension, containing the string "map_layer"
find . \
\( -type f -perm -u=x -name '*detect*' -print \) \
-or \
\( -type f -name "*.rs" -exec grep --files-with-matches map_layer '{}' ';' \)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment