shred(1)
π¦ NAME π¦
hey bestie, meet shred β your new main character straight out of the General Commands Manual (yes, that's the shred(1) energy π
). Her whole thing? She overwrites the specified FILE(s) repeatedly, so it gets harder for even very expensive hardware probing to recover the data. not just "oops I deleted it" β we're talking actual obliteration. no cap. π₯
β¨ SYNOPSIS β¨
here's how you summon her:
shred [-f|--force] [-n|--iterations] [-s|--size] [-u ] [--remove]
[-v|--verbose] [-x|--exact] [-z|--zero] [--random-source] [-h|--help]
[-V|--version] [file]
π DESCRIPTION π
okay so literally, the whole job description is: overwrite the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data. that's it. that's the mission. periodt. π
π OPTIONS π
-f,--forceβ if the permissions are being stubborn and blocking writes, this changes them so writing is actually possible. she will not be stopped. πͺ-n,--iterations <NUMBER>β overwriteNtimes instead of the default. default is3. so like,-n 7if you're feeling extra paranoid, bestie π«Ά-s,--size <N>β shred this many bytes only. suffixes likeK,M,Gare accepted, so you can be like "just this much" βοΈ-uβ deallocate and remove the file after overwriting. gone gone. π«₯--remove[=<HOW>]β like-ubut it gives you control over HOW to delete. see below for the tea π- possible values:
unlinkwipewipesync
- possible values:
-v,--verboseβ show progress. so you can sit there and watch her cook π-x,--exactβ do not round file sizes up to the next full block. this is the default for non-regular files, fyi β¨-z,--zeroβ add a final overwrite with zeros to hide the shredding. the little finishing touch π--random-sourceβ take random bytes from FILE π²-h,--helpβ print help π-V,--versionβ print version π·οΈ[file]β the file(s) in question, obviously π
π EXTRA π
Delete the FILE(s) if --remove (-u) is specified. The default is not to remove the files, because it's super common to operate on device files like /dev/hda, and those files usually should not be removed. so like, chill, she's not gonna yeet your devices unless you tell her to. π
β οΈ CAUTION: note that shred relies on a very important assumption: that the file system overwrites data in place. This is the traditional way to do things, but many modern file system designs do not satisfy this assumption. π
The following are examples of file systems on which shred is not effective, or is not guaranteed to be effective in all file system modes:
- log-structured or journal file systems, such as those supplied with AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)
- file systems that write redundant data and carry on even if some writes fail, such as RAID-based file systems
- file systems that make snapshots, such as Network Appliance's NFS server
- file systems that cache in temporary locations, such as NFS version 3 clients
- compressed file systems
In the case of ext3 file systems, the above disclaimer applies (and shred is thus of limited effectiveness) only in data=journal mode, which journals file data in addition to just metadata. In both the data=ordered (default) and data=writeback modes, shred works as usual. Ext3 journal modes can be changed by adding the data=something option to the mount options for a particular file system in the /etc/fstab file, as documented in the mount man page (man mount). π οΈ
In addition, file system backups and remote mirrors may contain copies of the file that cannot be removed, and that will allow a shredded file to be recovered later. yeah. that's the scary part. π¬
β VERSION β
v(uutils coreutils) 0.7.0
okay that's the whole page, bestie π«Ά this came from shred (uutils coreutils) 0.7.0, page shred(1) β and ngl the footer didn't bring a date with it, so we're rolling with the version and the section number and calling it a day. stay safe out there, and remember: shred responsibly. πβ¨
π¦ where this page comes from
- epel 10: rust-coreutils-devel 0.7.0-10.el10_3 Β· MIT
- epel 10: uutils-coreutils 0.7.0-10.el10_3 Β· (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Zlib AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 OR GPL-2.0-only) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND (MIT OR Zlib OR Apache-2.0) AND (MIT-0 OR Apache-2.0) AND Unicode-3.0 AND (Unlicense OR MIT)
- fedora 43: rust-coreutils-devel 0.7.0-12.fc43 Β· MIT
- fedora 43: uutils-coreutils 0.7.0-12.fc43 Β· (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Zlib AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 OR GPL-2.0-only) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND (MIT OR Zlib OR Apache-2.0) AND (MIT-0 OR Apache-2.0) AND Unicode-3.0 AND (Unlicense OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms