| Crates.io | file_shred |
| lib.rs | file_shred |
| version | 1.2.1 |
| created_at | 2020-03-29 19:54:43.276797+00 |
| updated_at | 2025-01-29 20:18:59.331695+00 |
| description | Library and binary to securily delete files, overwriting and moving them before removal. |
| homepage | https://github.com/mverleg/file_shred |
| repository | https://github.com/mverleg/file_shred |
| max_upload_size | |
| id | 224177 |
| size | 52,797 |
Command line utility that safely deletes files.
Run the shredder with Docker:
docker run --rm -it -v "$(pwd):/data" mverleg/file-shred -- file.txt
You can mount any directory in which you want to shred files; the above example uses the current directory $(pwd).
To build the image yourself (instead of downloading from Dockerhub), clone the Github project and run:
docker build -t mverleg/file-shred .
This will also run the tests and lints, to verify that your version is okay.
You can shred files like
shred file.txt image.png /tmp/stuff/*
There are command line options for various things::
Arguments:
<FILES>... One or more paths to input files (absolute or relative)
Options:
-y, --no-confirm
Delete files without asking for confirmation
-v, --debug
Show debug information, especially on errors
-q, --quiet
Do not show progress or other non-critical output
-k, --keep
Destroy the data, but do not rename or delete the file. Useful for non-regular files like special system devices
--overwrite-count <OVERWRITE_COUNT>
Number of times the file is overwritten (at least 1) [default: 10]
--rename-count <RENAME_COUNT>
Number of times the file is renamed
To use default options on a single file, ues shred_file. To customize:
::file_shred::ShredConfig, options largely correspond to the command-line ones.confirmation_prompt=false if there might not be an interactive session present.::file_shred::shred function and pass this config.There are no security guarantees, and the author is not a professional security expert. Use at your own risk.
This is used by file_endec.