Skip to content

Instantly share code, notes, and snippets.

@stevenwilliamson
Created October 27, 2015 16:07
Show Gist options
  • Save stevenwilliamson/d7102301fa905a223aaf to your computer and use it in GitHub Desktop.
Save stevenwilliamson/d7102301fa905a223aaf 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