Skip to content

Instantly share code, notes, and snippets.

@ErykDarnowski
Last active September 11, 2023 12:25
Show Gist options
  • Save ErykDarnowski/8d4c0c37ae8671f1a6851f63a37f8e48 to your computer and use it in GitHub Desktop.
Save ErykDarnowski/8d4c0c37ae8671f1a6851f63a37f8e48 to your computer and use it in GitHub Desktop.
Find files (excluding `*.git*` folders) and only write their paths if they're **binary** files

Find files (excluding *.git* folders) and only write their paths if they're binary files

find . -type 'f' -not -path '*.git*' -exec file --mime {} \; | grep binary | cut -d: -f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment