Skip to content

Instantly share code, notes, and snippets.

@schneefisch
Last active September 14, 2020 09:03
Show Gist options
  • Save schneefisch/e7239160d7098ca6ee6515e255878ee5 to your computer and use it in GitHub Desktop.
Save schneefisch/e7239160d7098ca6ee6515e255878ee5 to your computer and use it in GitHub Desktop.
Delete files securely
#!/usr/bin/env bash
# securely overwrite data (default: 3 iterations of random data)
shred -v <path_to_your_file>
# only overwrite once with zeros
shred -vzn 0 <path_to_your_file>
# alternative, for also securely deleting directories
# the file is also removed
wipe <filename>
wipe -r <dirname>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment