Skip to content

Instantly share code, notes, and snippets.

@w4tson
Last active October 25, 2017 10:55
Show Gist options
  • Save w4tson/ad623e91c03de4d57a638a8bee6346c0 to your computer and use it in GitHub Desktop.
Save w4tson/ad623e91c03de4d57a638a8bee6346c0 to your computer and use it in GitHub Desktop.
#
# Find all files in the last 45 mins, print them null separated and from that create an new tgz using standard-in as a file
#
find . -cmin -45 -type f -print0 | tar -cvzf ../../foo.tgz --null -T -
#
# Same as above however first searches for .nexus|.meta dir and prunes.
#
find . -not \( -name \.nexus -prune \) -not \( -name \.meta -prune \) -not \( -name central-m1 -prune \) -cmin -45 -type f -print0 | tar -cvzf ../../foo.tgz --null -T -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment