Last active
March 21, 2020 08:50
-
-
Save mo-han/dff1e13f1fff8b5df0d1c8de57597a53 to your computer and use it in GitHub Desktop.
create/remove a CACHEDIR.TAG file inside the given directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -L https://gist.githubusercontent.com/mo-han/dff1e13f1fff8b5df0d1c8de57597a53/raw/69c68a0f77a0670f8d6cfa10139b7feb5a30f9f2/tag-cachedir.sh > /usr/local/bin/tagcachedir | |
chmod +x /usr/local/bin/tagcachedir | |
curl -L https://gist.githubusercontent.com/mo-han/dff1e13f1fff8b5df0d1c8de57597a53/raw/69ee94866357c69f9716449142580af9d4ea7901/untag-cachedir.sh > /usr/local/bin/untagcachedir | |
chmod +x /usr/local/bin/untagcachedir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cat <<EOF >"$1"/CACHEDIR.TAG | |
Signature: 8a477f597d28d172789f06886806bc55 | |
# This file is a cache directory tag created by (application name). | |
# For information about cache directory tags, see: | |
# http://www.brynosaurus.com/cachedir/ | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rm "$1"/CACHEDIR.TAG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment