Secure file deletion from the command line
803
Command line utility that safely deletes files.
Source code: https://github.com/mverleg/file_shred
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::
USAGE:
shred [FLAGS] [OPTIONS] <FILES>...
FLAGS:
-v, --debug Show debug information, especially on errors.
-h, --help Prints help information
-k, --keep Destroy the data, but do not rename or delete the file. Useful for non-regular files like special system devices.
-y, --no-confirm Delete files without asking for confirmation.
-q, --quiet Do not show progress or other non-critical output.
-V, --version Prints version information
OPTIONS:
--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.
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.
Content type
Image
Digest
Size
1.2 MB
Last updated
over 5 years ago
docker pull mverleg/file-shred