Skip to content

Instantly share code, notes, and snippets.

@dshipp
Last active December 25, 2015 01:59
Show Gist options
  • Save dshipp/6899485 to your computer and use it in GitHub Desktop.
Save dshipp/6899485 to your computer and use it in GitHub Desktop.
Output all directories that contain a particular file type anywhere within the directory structure. Useful for checking where there are directories that represent python projects for example.
#!/bin/bash
# In this example checking for directories containing Python files
find -iname '*.py' -printf '%h/\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment