Skip to content

Instantly share code, notes, and snippets.

@drscream
Created January 4, 2014 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drscream/8255753 to your computer and use it in GitHub Desktop.
Save drscream/8255753 to your computer and use it in GitHub Desktop.
# Find all folders (for example in /content/smartos-live/proto/usr/perl5/site_perl/5.12/Munin)
find -type d | while read l; do n=$(basename $l); echo "d usr/perl5/site_perl/5.12/Munin/${n} 0755 root bin"; done
# Find all files
find "${PWD}" -type f | while read l; do n=$l; echo "f ${n/\/content\/smartos-live\/proto\//} 0644 root bin"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment