How To Linux Learn the Proper Use of the Linux Shred Command When you don't want anyone to see the files you delete Share Pin Email Print Image Source / Getty Images Linux Commands Basics Guides & Tutorials Installing & Upgrading Tips & Tricks Key Concepts by Juergen Haas Updated December 06, 2017 Shred is one of four Linux commands that sound similar but are not the same: shred, wipe, delete, and erase.You use shred when you want to permanently erase a single piece of data. The information, which you identify, is overwritten by 1s and 0s several times, which permanently erases the data, unlike the other similar commands that erase data that is retrievable under certain circumstances. With the shred command, you can shred a small collection of files whenever you want. It is an easy way to erase data you don't want anyone to be able to unerase. Ever.Shred Syntax shred [OPTIONS] FILE [...]Options When Using the Shred CommandUse the Shred command to overwrite the specified files repeatedly and make it difficult or impossible for even expensive hardware or software to recover the data. Options include:-f changes permissions to allow writing if needed-n (iterations=N) overwrites N times instead of the default (3)-s (size=N) specifies the number of bytes to shred-u truncates and removes files after overwriting-v shows verbose information about the progress-x does not round file sizes up to the next full block-z adds a final overwrite with zeros to hide shredding-u removes the file after overwritingExamples of the Shred CommandTo enter the names of the exact files you want to shred, use the following format: shred fileABC.text file2.doc file3.jpgIf you add the option -u, the listed files are shredded and also deleted to free up space. shred -u fileABC.text file2.doc file3.jpgPlaces Shred Doesn't WorkShred relies on an important assumption—that the file system overwrites data in place. This is traditional, but some file systems do not satisfy this assumption. The following are examples of file systems on which shred is not effective: Log-structured or journaled file systems, such as those supplied with AIX and Solaris (and JFS, ReiserFS, XFS, and Ext3)File systems that write redundant data and carry on even if some writes fail, such as RAID-based file systemsFile systems that make snapshots, such as Network Appliance's NFS serverFile systems that cache in temporary locations, such as NFS version 3 clientsCompressed file systemsIn addition, file system backups and remote mirrors may contain copies of the file that cannot be removed, and that could allow a shredded file to be recovered later. Was this page helpful? Thanks for letting us know! Share Pin Email Tell us why! Other Not enough details Hard to understand Submit Continue Reading