David Christensen <dpchr...@holgerdanske.com> wrote: > On 2/10/24 16:10, Greg Wooledge wrote: > > On Sat, Feb 10, 2024 at 04:05:21PM -0800, David Christensen wrote: > >> 2024-02-10 16:03:50 dpchrist@laalaa ~ > >> $ shred -s 1K - | wc -c > >> shred: -: invalid file type > >> 0 > >> > >> > >> It looks like a shred(1) needs a bug report. > > > > I'm confused what you expected this command to do. You wanted to > > "destroy" (by overwriting with random data) a pipe to wc? What > > would that even look like? > > > > The basic premise of shred is that it determines the size of the > > file, then writes data over it, rewinds it, and repeats this a few > > times. A pipe to a process has no size, and can't be rewound. > > > > Declaring a pipe to be an "invalid file type" for shredding sounds > > pretty reasonable to me. > > > The documentation is confusing: > > On 2/10/24 16:05, David Christensen wrote: > > 2024-02-10 16:03:42 dpchrist@laalaa ~ > > $ man shred | grep 'If FILE is -' > > If FILE is -, shred standard output.
Maybe it is unstated but mandatory to use -n 1 as well? And optionally -s N? I expect reading the code would tell. First time I've read the man page properly. Interesting point about COW filesystems such as btrfs :)