Created
August 26, 2018 14:33
-
-
Save vijinho/cf9f4d1009b253be5887ca0a69c102f2 to your computer and use it in GitHub Desktop.
overwrite files with random data and then remove
This file contains hidden or 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 | |
files=$@ | |
for file in $files; | |
do | |
set `du $file`; | |
size=$1 | |
for times in 0 1 2; | |
do | |
dd if=/dev/urandom of=$file count=$size conv=notrunc | |
done | |
rm $file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment