Last active
June 19, 2020 10:32
-
-
Save snarlysodboxer/5732045 to your computer and use it in GitHub Desktop.
Write zeros over all of the free space on your disk. Afterwards, remove a small file before removing the big file to help the system be more responsive in the meantime.
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 | |
dd if=/dev/zero of=$HOME/zero.small.file iflag=nocache oflag=direct bs=1024 count=102400 | |
dd if=/dev/zero of=$HOME/zero.file iflag=nocache oflag=direct bs=4096 | |
rm $HOME/zero.small.file | |
rm $HOME/zero.file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment