Forrest logo
back to the shred tool

shred:tldr:955bd

shred: Overwrite a file, leaving zeroes instead of random data.
$ shred --zero ${filename}
try on your machine

The command shred --zero ${filename} is used to securely delete a file on a Linux system. It utilizes the shred command with the --zero option and the ${filename} variable to specify the file to be deleted.

Here is a breakdown of each component of the command:

  1. shred: This is the command that securely deletes files. It overwrites the contents of the file multiple times to make it difficult or impossible to recover any data from it.

  2. --zero: This is an option for the shred command. It specifies that the file should be overwritten with zero bytes (null characters) instead of random data.

  3. ${filename}: This is a variable representing the name of the file you want to delete. You need to replace ${filename} with the actual name of the file you want to securely delete.

When the command is executed, the specified file will be overwritten with zero bytes, effectively deleting its contents. This helps to ensure that the file cannot be recovered or accessed in any way.

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