shred is a command in operating systems of type Unix in Portuguese means: shredding. It is used to securely delete files and devices, making them extremely difficult to recover, even with specialized hardware and technology; It is part of GNU Core Utilities .
The process of delete a file from storage using the command rm usually erases only the file system entry of the file, keeping the contents of the file intact. This often allows commonly available software to recover data from the “deleted” file.
If the file data is stored on magnetic media, such as an HDD , even if the file is overwritten, residual magnetic fields may allow data recovery using hardware equipment skilled .
To avoid this, shredding replaces the contents of a file multiple times, using patterns chosen to maximize the destruction of residual data.
shred
?If you have a GNU/Linux system, you probably already have shred
installed on your system. In many cases BSD and similar systems, such as macOS there is also a great chance to have already installed.
But if you don’t have it or if you have another operating system, like Windows for example, you can clone and compile from this address: https:// www.gnu.org/software/coreutils/ .
In short shred
is just a file written in C: shred.c .
The basic syntax is similar to several commands which boils down to:
The file can also be a device.
The file will still not be removed, however the data it contains will no longer exist.
-v
parameter-z
parameter assigns zeros to the data, in conjunction with -v
you can see this:Note that after running the above commands, the file will still exist. For after destroying and zeroing the data you want to delete the file just use the -u
command, example using it together with previous parameters:
Really good right?! For more information, access the help and manual: