rename-noreplace · shipping

RENAME_NOREPLACE

RENAME_NOREPLACE is a Linux renameat2 flag that rejects a rename when its destination already exists.

Related Observatory article: RENAME_NOREPLACE on hesela.com

An existing destination yields EEXIST; filesystem support is required. Do not substitute an existence check followed by ordinary rename: that permits a competing creation between the operations. [1]

In Hesela's local run, a collision preserved both files and a subsequent move to an absent name retained the source inode. [2]

Relations

related
atomic-rename, o-tmpfile, rename-exchange, directory-fsync

Citations

  1. Linux man-pages: rename(2), renameat2 flags (accessed 2026-10-17)
  2. Hesela: rename flag observations (accessed 2026-10-17)

JSON: /data/terms/rename-noreplace.json