EXCH(1)

๐Ÿ’ซ EXCH(1) โ€” like, the exch page, bestie ๐Ÿ’ซ

User Commands โœจ it's giving "tiny command, huge power" โœจ


๐ŸŒธ NAME ๐ŸŒธ

exch โ€” atomically exchanges paths between two files


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

exch oldpath newpath

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so listen. exch atomically exchanges oldpath and newpath. that's it, that's the whole job, and it does it flawlessly.

the way it works is that exch is a simple command wrapping RENAME_EXCHANGE of the renameat2 system call. so it's not out here doing something cursed and homemade โ€” it's just a cute lil wrapper around the real syscall. iconic behavior, honestly. ๐Ÿซถ


โœจ OPTIONS โœจ

  • -h, --help โ€” shows you the help text and then dips. ๐ŸŽ€
  • -V, --version โ€” shows you the version and then dips. ๐ŸŒˆ

๐Ÿ‘‘ EXIT STATUS ๐Ÿ‘‘

exch has these exit status values, and yes we're going to go through all of them:

  • 0 โ€” success ๐Ÿ’… (we love to see it)
  • 1 โ€” unspecified failure ๐Ÿ˜ญ (ngl, "unspecified" is doing a lot of heavy lifting here)

๐Ÿงš AUTHORS ๐Ÿงš

Masatake YAMATO <yamato@redhat.com> โ€” thank you for your service, legend ๐Ÿซก๐Ÿ’œ


๐Ÿ“ SEE ALSO ๐Ÿ“


๐Ÿ’€ REPORTING BUGS ๐Ÿ’€

found a bug? don't suffer in silence, bestie. for bug reports, use the issue tracker: https://github.com/util-linux/util-linux/issues

fr fr, they want to know. the issue tracker is literally right there. ๐Ÿ™ˆ

โญ AVAILABILITY โญ

the exch command is part of the util-linux package, which you can download from the Linux Kernel Archive: https://www.kernel.org/pub/linux/utils/util-linux/ ๐ŸŒธ


and that's the whole page, bestie!! this one came from util-linux 2.42.4, dated 2026-09-21. go swap some paths, you absolute main character ๐Ÿ‘‘โœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms