On Fri, 21 Oct 2005, Jim Meyering wrote:

Mikael Magnusson <[EMAIL PROTECTED]> wrote:
I have a file "a" and a fifo "b". Running "cp a b" prompts "cp: overwrite
b?", but answering yes just writes the contents of "a" into the fifo. If

In this particular case, using the gnu-specific --remove-destination
option will make it do what you want.

Ah, i missed that one. What is the advantage of truncating the existing file instead of removing it first? I guess the man page does state that it won't remove existing files when it says existing files are opened with O_WRONLY | O_CREAT, but I didn't realize the implications of this for fifos and hardlinks.

--
Mikael Magnusson


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to