Skip to content

Instantly share code, notes, and snippets.

@tamboer
Last active December 25, 2015 01:49
Show Gist options
  • Select an option

  • Save tamboer/6897494 to your computer and use it in GitHub Desktop.

Select an option

Save tamboer/6897494 to your computer and use it in GitHub Desktop.
Count lines of code SLOC - Source Lines of Code
http://stackoverflow.com/questions/1358540/how-to-count-all-the-lines-of-code-in-a-directory-recursively
find . -name '*.php' | xargs wc -l
==================================
If you are looking to find filenames then use "find" like this:
find /directory/path/to/search -name "filename or part thereof"
==================================
If you need to find text within files recursively through a directory tree use grep:
grep -R "string to search for" /path/to/directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment