Collin Funk <[email protected]> writes: > I think that is a good idea. The limitation applies to any files though, > not just standard output, so I placed it away from that sentence. > > I haven't pushed it yet in case anyone has ideas to improve the > wording. The texinfo manual should probably have a similar sentence, > too. I can add that later.
I pushed the attached v2 patch, which also adds a note in the texinfo manual. Thanks again for the good suggestion. Collin
>From 45bbd75fb03564e58b7b1a2cc48809bd6936b02f Mon Sep 17 00:00:00 2001 Message-ID: <45bbd75fb03564e58b7b1a2cc48809bd6936b02f.1778730663.git.collin.fu...@gmail.com> From: Collin Funk <[email protected]> Date: Tue, 12 May 2026 18:35:28 -0700 Subject: [PATCH v2] 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 --- doc/coreutils.texi | 4 ++++ src/shred.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index a37b63388..fb12856da 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -10372,6 +10372,10 @@ @node shred invocation 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 316268691..a0b7089f5 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\ -- 2.54.0
