Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@siers
Created April 4, 2020 12:32
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 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