From: Collin Funk Date: Wed, 13 May 2026 01:35:28 +0000 (-0700) Subject: doc: shred: mention unsupported file types X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=45bbd75fb03564e58b7b1a2cc48809bd6936b02f;p=thirdparty%2Fcoreutils.git doc: shred: mention unsupported file types * src/shred.c (usage): Mention the behavior of 'shred' on FIFOs, sockets, and terminals. * doc/coreutils.texi (shred invocation): Likewise. Addresses https://bugs.gnu.org/30177 --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index a37b63388e..fb12856daa 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -10372,6 +10372,10 @@ to destroy using @command{shred}, be sure that it is not backed up or mirrored. shred [@var{option}]@dots{} @var{file}[@dots{}] @end example +If @var{file} is a FIFO, socket, or terminal, @command{shred} skips it +and emit a diagnostic message because the contents of these file types +do not reside on disk. + The program accepts the following options. Also see @ref{Common options}. @table @samp diff --git a/src/shred.c b/src/shred.c index 316268691f..a0b7089f5b 100644 --- a/src/shred.c +++ b/src/shred.c @@ -220,6 +220,11 @@ If FILE is -, shred standard output.\n\ oputs (VERSION_OPTION_DESCRIPTION); fputs (_("\ \n\ +FILE will be skipped with a diagnostic message if it is a FIFO, socket, or\n\ +terminal, since its data does not reside on disk.\n\ +"), stdout); + fputs (_("\ +\n\ Delete FILE(s) if --remove (-u) is specified. The default is not to remove\n\ the files because it is common to operate on device files like /dev/hda,\n\ and those files usually should not be removed.\n\