Skip to content

Instantly share code, notes, and snippets.

@og-shawn-crigger
Created April 30, 2012 23:36
Show Gist options
  • Save og-shawn-crigger/2563651 to your computer and use it in GitHub Desktop.
Save og-shawn-crigger/2563651 to your computer and use it in GitHub Desktop.
CLI Command to Find and Combine Text Files
find ./src -name '*.txt' -exec cat '{}' \; > test.txt
//The above looks through everything in the ./src directory (including all subdirectories) for any files with the .txt //extension. Each file it finds, it adds to test.txt. So at the end of the command's run, all of the text files will be //combined together into text.txt. You can use this strategy to easily combine lots of files into one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment