https://github.com/ztalbot2000/zerofile
Simple command line tool that fill a file with binary zeroes, then removes it.
https://github.com/ztalbot2000/zerofile
clean clear data disk erase fill reset security wipe zero
Last synced: about 2 months ago
JSON representation
Simple command line tool that fill a file with binary zeroes, then removes it.
- Host: GitHub
- URL: https://github.com/ztalbot2000/zerofile
- Owner: ztalbot2000
- License: other
- Created: 2021-02-14T15:26:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-14T16:38:19.000Z (over 4 years ago)
- Last Synced: 2025-03-26T10:21:16.302Z (7 months ago)
- Topics: clean, clear, data, disk, erase, fill, reset, security, wipe, zero
- Language: C
- Homepage:
- Size: 5.86 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zerofile
Simple command line tool that fill a file with binary zeroes, then removes it.
The file is filled 4096 bytes at the time (blocksize), and halves it when disk space is to small for 4096 bytes. So next time it's 2048 and so on, until it's less than 256 when it will remove the tempfile and exit.
The reason for halving is to really fill up all the free space with zeroes. If the selected block size is larger than the file system block size the halving is not really usefull,## Author
zerofile originated from [https://github.com/nollan/zerofile](https://github.com/nollan/zerofile). I have the written consent to use the name 'zerofile' and thank Patric Fors for his efforts. zerofile was originally written in 'Go' and I converted it here to 'C'. The functionality is 100% the same, with the exception of the new test script.## Building
gcc -o zerofile zerofile.c## Example
```
$ zerofile
Using temp file: '0slask0.zro'
Written: 40300699648 bytes
Duration: 7m41.89093482s ; Performance: 87251549.195 bytes/sec
Removing temp-file
```Why filling empty space with zeroes?
* Deleting a file just throws away the location to it, not the content.
* When making an image of the filesystem, to keep the size down.## Options
No arguments needed, but if you want to create the file on a different place than current directory put path and filename as an argument (`zerofile some/other/file.tmp`).
The filename of the tempfile is by default `0slask0.zro`, use an argument to select your own name (`zerofile whatever.000`).
And use `-quiet` to skip the progress report on written bytes, a bit quicker this way.
Set a specific block size with `-blocksize`, it's 4096 by default.
## Performance
Stats produced are quick and dirty, don't use them as a hard disk performance checker. :)
## License
See [LICENSE](LICENSE)Note: As this pertains to item #3, I have been granted permission by the original author of zerofile to use the name zerofile and thank him profusely as this is what I believe GitHub is all about. See: https://github.com/nollan/zerofile/issues/1