Skip to content

Instantly share code, notes, and snippets.

@sharjeelaziz
Last active October 22, 2016 16:11
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 sharjeelaziz/0d3a5c579c98c0d280c75d1abe98fcd6 to your computer and use it in GitHub Desktop.
Save sharjeelaziz/0d3a5c579c98c0d280c75d1abe98fcd6 to your computer and use it in GitHub Desktop.
# make the tmpfs
mkdir /mnt/tmpfs
chmod 0700 /mnt/tmpfs
mount -t tmpfs -o size=1M tmpfs /mnt/tmpfs
cd /mnt/tmpfs
# decrypt the data
gpg -o - <crypted_input_file> | \
tar -xjpf -
# do processing stuff
# wipe contents
find /mnt/tmpfs -type f -exec shred {} \;
# nuke the tmpfs
cd ..
umount -f /mnt/tmpfs
rm -fR /mnt/tmpfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment