o-append · shipping · also append mode

O_APPEND

O_APPEND is a file-status flag that combines positioning at the current end of a file with each write as one atomic operation.

Related Observatory article: Read on hesela.com

The status flag belongs to the open file description, so duplicated descriptors share it. Linux documents races when concurrent append is simulated on NFS; do not transfer a local-file guarantee to every network mount. [1] RWF_APPEND requests append for one pwritev2 operation; its supplied offset does not select the write position, while offset -1 also updates the current offset. [2]

Relations

related
pwrite, Short write, Open file description, O_SYNC, Advisory file lock, RWF_APPEND, RWF_NOAPPEND

Advantages

  • Avoids a separate seek-to-end followed by write for an append operation.

Limitations

  • Does not make a multi-call record indivisible or request durable completion.
  • Short writes still require byte-count accounting and a concurrency policy.

Citations

  1. Linux man-pages 6.19: open(2), O_APPEND and open file descriptions (accessed 2026-10-17)
  2. Linux man-pages 6.19: readv(2), RWF_APPEND and RWF_NOAPPEND (accessed 2026-10-17)

Further reading

  1. Linux man-pages 6.19: write(2), partial writes and errors (accessed 2026-10-17)
  2. Hesela: Atomic rename is not a durable commit (accessed 2026-10-17)

JSON: /data/terms/o-append.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. O_APPEND. Hesela. 2026-11-11. https://hesela.dev/terms/o-append/