155 lines
5.2 KiB
HTML
155 lines
5.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SHRED</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SHRED</H1>
|
|
Section: User Commands (1)<BR>Updated: September 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
shred - overwrite a file to hide its contents, and optionally delete it
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>shred</B>
|
|
|
|
[<I>,OPTION/</I>]... <I>,FILE/</I>...
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
|
|
Overwrite the specified FILE(s) repeatedly, in order to make it harder
|
|
for even very expensive hardware probing to recover the data.
|
|
<P>
|
|
|
|
If FILE is -, shred standard output.
|
|
<P>
|
|
|
|
Mandatory arguments to long options are mandatory for short options too.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-f</B>, <B>--force</B><DD>
|
|
change permissions to allow writing if necessary
|
|
<DT id="2"><B>-n</B>, <B>--iterations</B>=<I>,N/</I><DD>
|
|
overwrite N times instead of the default (3)
|
|
<DT id="3"><B>--random-source</B>=<I>,FILE/</I><DD>
|
|
get random bytes from FILE
|
|
<DT id="4"><B>-s</B>, <B>--size</B>=<I>,N/</I><DD>
|
|
shred this many bytes (suffixes like K, M, G accepted)
|
|
<DT id="5"><B>-u</B><DD>
|
|
deallocate and remove file after overwriting
|
|
<DT id="6"><B>--remove</B>[=<I>,HOW/</I>]<DD>
|
|
like <B>-u</B> but give control on HOW to delete; See below
|
|
<DT id="7"><B>-v</B>, <B>--verbose</B><DD>
|
|
show progress
|
|
<DT id="8"><B>-x</B>, <B>--exact</B><DD>
|
|
do not round file sizes up to the next full block;
|
|
<DT id="9"><DD>
|
|
this is the default for non-regular files
|
|
<DT id="10"><B>-z</B>, <B>--zero</B><DD>
|
|
add a final overwrite with zeros to hide shredding
|
|
<DT id="11"><B>--help</B><DD>
|
|
display this help and exit
|
|
<DT id="12"><B>--version</B><DD>
|
|
output version information and exit
|
|
</DL>
|
|
<P>
|
|
|
|
Delete FILE(s) if <B>--remove</B> (<B>-u</B>) is specified. The default is not to remove
|
|
the files because it is common to operate on device files like <I>,/dev/hda/</I>,
|
|
and those files usually should not be removed.
|
|
The optional HOW parameter indicates how to remove a directory entry:
|
|
'unlink' => use a standard unlink call.
|
|
'wipe' => also first obfuscate bytes in the name.
|
|
'wipesync' => also sync each obfuscated byte to disk.
|
|
The default mode is 'wipesync', but note it can be expensive.
|
|
<P>
|
|
|
|
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:
|
|
<P>
|
|
|
|
* log-structured or journaled file systems, such as those supplied with
|
|
AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)
|
|
<P>
|
|
|
|
* file systems that write redundant data and carry on even if some writes
|
|
fail, such as RAID-based file systems
|
|
<P>
|
|
|
|
* file systems that make snapshots, such as Network Appliance's NFS server
|
|
<P>
|
|
|
|
* file systems that cache in temporary locations, such as NFS
|
|
version 3 clients
|
|
<P>
|
|
|
|
* compressed file systems
|
|
<P>
|
|
|
|
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 journaling modes can be changed by adding the data=something option
|
|
to the mount options for a particular file system in the <I>,/etc/fstab/</I> file,
|
|
as documented in the mount man page (man mount).
|
|
<P>
|
|
|
|
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.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Written by Colin Plumb.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>REPORTING BUGS</H2>
|
|
|
|
GNU coreutils online help: <<A HREF="https://www.gnu.org/software/coreutils/">https://www.gnu.org/software/coreutils/</A>>
|
|
<BR>
|
|
|
|
Report shred translation bugs to <<A HREF="https://translationproject.org/team/">https://translationproject.org/team/</A>>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
Copyright © 2018 Free Software Foundation, Inc.
|
|
License GPLv3+: GNU GPL version 3 or later <<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>>.
|
|
<BR>
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
Full documentation at: <<A HREF="https://www.gnu.org/software/coreutils/shred">https://www.gnu.org/software/coreutils/shred</A>>
|
|
<BR>
|
|
|
|
or available locally via: info '(coreutils) shred invocation'
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="13"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="14"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="15"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="16"><A HREF="#lbAE">AUTHOR</A><DD>
|
|
<DT id="17"><A HREF="#lbAF">REPORTING BUGS</A><DD>
|
|
<DT id="18"><A HREF="#lbAG">COPYRIGHT</A><DD>
|
|
<DT id="19"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:27 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|