EXCH(1) User Commands EXCH(1)

# [NAME](#NAME)

exch - atomically exchanges paths between two files

# [SYNOPSIS](#SYNOPSIS)

**exch** *oldpath* *newpath*

# [DESCRIPTION](#DESCRIPTION)

**exch** atomically exchanges oldpath and newpath. **exch** is a simple command wrapping **RENAME\_EXCHANGE** of **renameat2** system call.

# [OPTIONS](#OPTIONS)

**-h**, **--help**

Display help text and exit.

**-V**, **--version**

Display version and exit.

# [EXIT STATUS](#EXIT_STATUS)

**exch** has the following exit status values:

**0**

success

**1**

unspecified failure

# [AUTHORS](#AUTHORS)

*Masatake YAMATO* &lt;yamato@redhat.com&gt;

# [SEE ALSO](#SEE_ALSO)

[**renameat2**(2)](/man/os/util-linux/renameat2.2)

# [REPORTING BUGS](#REPORTING_BUGS)

For bug reports, use the *issue tracker* &lt;https://github.com/util-linux/util-linux/issues&gt;.

# [AVAILABILITY](#AVAILABILITY)

The **exch** command is part of the util-linux package which can be downloaded from *Linux Kernel Archive* &lt;https://www.kernel.org/pub/linux/utils/util-linux/&gt;.

2026-10-19 util-linux 2.42.4

---

Document: exch(1) from util-linux 2.42.4-r1 (Chainguard OS)
