Perhaps it should be said that personal use of gpg and the use that a system administrator makes of it and key-ing are different use-cases. So we might expect fewer assumptions to hold and greater mystery :-)
On Sat, Jun 26, 2021 at 08:42:26AM -0400, Cindy Sue Causey wrote:
> On 6/26/21, Andrei POPESCU <andreimpopescu@gmail.com> wrote:
[...]
> > Well, it makes perfect sense if you remember that "everything is a
> > file", even if there are exceptions (e.g. network devices).
>
>
> Hopefully I'm reading this right. While on dialup, I spent A LOT of
> time battling a well-known closed source modem tty* driver. Out of
> desperation, I could sometimes get it to work by copying it between
> hard drives that contained separate operating systems.
>
> BUT you can't just e.g. "cp" or "right click > copy" it over. It would
> fail with a "Can't copy special file" error message. I know this
> because I just did it again with ttyS0. You CAN rsync it between
> partitions, and it would be viable, usable.
Wait a sec. You are not trying to copy /dev/ttyS0 (or its kin)?
Because that won't really make much sense. Or, well, it will perhaps
do surprising things.
See, /dev/ttyS0 is a representation of an external device (your first
serial interface, if your computer still has such a thing). You can
open it, read from it (which will yield incoming characters), write
to it (which will send the characters out, if all goes well) -- so
to your applications it presents an interface similar to the one
a file presents. This is Andrei's quote "everything is a file".
If you now copy /dev/ttyS0 to /tmp, e.g.
sudo cp /dev/ttyS0 /tmp
and assuming there's something connected to it and sending us characters,
there will be an ever-growing /tmp/ttyS0 and the copy will terminate
the moment the serial connection's other side "hangs up".
Now if you do
sudo cp -a /dev/ttyS0 /tmp
you get something completely different: a device file (referring to the
exact same device as your original).
Don't forget to remove them after: your system administrator might get
mighty confused finding a device file in /tmp :-)
Cheers
- t