Forrest logo
back to the shred tool

shred:tldr:e5c1c

shred: Overwrite a file 25 times.
$ shred -n25 ${filename}
try on your machine

The command "shred -n25 ${filename}" is used to securely delete a file by overwriting its content multiple times. Here is an explanation of each part:

  • "shred" is a command-line utility in Unix-like operating systems designed to overwrite and delete files securely. It is primarily used to prevent file recovery by malicious individuals.

  • "-n25" is an option for the "shred" command that specifies the number of times the file's content should be overwritten. In this case, "25" indicates that the file will be overwritten 25 times.

  • "${filename}" is a placeholder for the actual name of the file you want to shred. You need to replace it with the specific filename and path.

So, when you run this command, it will overwrite the content of the specified file 25 times with random data, making it extremely difficult to recover any original data from the file. This ensures that the file cannot be reconstructed or retrieved by unauthorized users.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the shred tool