Is there any difference between the two redirections in the following code?
mkfifo foo echo > foo echo >> foo
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There should be no difference. The
>> will open the fifo with the
O_APPEND flag, and that shouldn't make any difference on a fifo or other non-seekable file.
However, there are buggy interfaces like
sendfile(2) in Linux, which do not work with files opened in
O_APPEND mode, and will object even to non-seekable files having that mode set, so you better always use the