On 2/12/24 08:50, Curt wrote:
On 2024-02-11, <to...@tuxteam.de> <to...@tuxteam.de> wrote:
On Sun, Feb 11, 2024 at 09:54:24AM -0500, Greg Wooledge wrote:
[...]
If FILE is -, shred standard output.
=20
In every sentence, the word FILE appears. There's nothing in there
which says "you can operate on a non-file".
Point taken, yes.
I thought everything was a file.
"Everything is a file" is a design feature of the Unix operating system:
https://en.wikipedia.org/wiki/Everything_is_a_file
But, there is more than one kind of file.
And, not every program supports every kind of file.
The manual page for find(1) provides a shopping list of file types it
supports:
2024-02-12 12:32:13 dpchrist@laalaa ~
$ man find | egrep -A 20 '^ .type c'
-type c
File is of type c:
b block (buffered) special
c character (unbuffered) special
d directory
p named pipe (FIFO)
f regular file
l symbolic link; this is never true if the
-L option or the -follow option is in ef-
fect, unless the symbolic link is broken.
If you want to search for symbolic links
when -L is in effect, use -xtype.
s socket
As for shred(1), the argument FILE is conventionally a regular file. We
are discussing the special case described in the manual page:
If FILE is -, shred standard output.
David