Skip to content

Instantly share code, notes, and snippets.

@danieldownes
Created April 12, 2023 22:08
Show Gist options
  • Save danieldownes/dc13a12cd2201eba1a7e61ecff30f53f to your computer and use it in GitHub Desktop.
Save danieldownes/dc13a12cd2201eba1a7e61ecff30f53f to your computer and use it in GitHub Desktop.
Collapse many files into a single file
To collapse a whole project into a single file:
"cat files in current folder and all subfolders"
find . -type f -exec cat {} +
cat accepts multiple arguments:
cat * */*
to cat everything in the current directory and in all subdirectories:
cat * */* */*/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment