Skip to content

Instantly share code, notes, and snippets.

@siers
Created April 4, 2020 12:32
Show Gist options
  • Save siers/f64323ecd1e0842922caa1d73562a550 to your computer and use it in GitHub Desktop.
Save siers/f64323ecd1e0842922caa1d73562a550 to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
set -eu
pwd | grep -q '^/tmp'
cat > excl <<-EOF
a
b/*c*
./d
EOF
touch a c d e
mkdir -p b/x/x
touch b/{a,b,d,bcb,x/c}
diff --color <(find . | sort) <(tar c --exclude-from=excl . | tar t | sed 's:/$::' | sort)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment