Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Exch(1) – atomically exchanges paths between two files (2023)
(
man7.org
)
15 points
by
jesprenj
on May 30, 2024
|
hide
|
past
|
favorite
|
4 comments
AstroJetson
on June 2, 2024
|
next
[–]
I think the time it would take me to remember the command, look at the man page to see if I had it right, and then do the command, I could have done the three mv commands
mv zork mytemp
mv advent zork
mv mytemp advent
rurban
on June 2, 2024
|
parent
|
next
[–]
Not atomic. We are talking renameat2 () here
pajko
on May 31, 2024
|
prev
|
next
[–]
https://github.com/asottile-archive/rename-exchange
(2021)
yesco
on May 31, 2024
|
prev
[–]
I'm surprised this isn't in more standard libraries, are there any other atomic file operations being neglected like this?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
mv zork mytemp
mv advent zork
mv mytemp advent