Replace /lib on Linux with one command: "rename li lib lib li" (new was "li", old became "libb")
-
-
Replying to @solardiz
Still non-atomic and unsafe for concurrent activity on a live system.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @solardiz
If you need atomicity, make lib a symlink and: mkdir lib_tmp ln -s lib_new lib_tmp/lib mv lib_tmp/lib . rmdir lib_tmp
2 replies 0 retweets 0 likes -
Replying to @RichFelker @solardiz
Perhaps using a bind mount, replacing the masked directory and then getting rid of the bind mount.
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS @RichFelker
How would you replace the directory masked by the bind mount?
2 replies 0 retweets 0 likes -
if your kernel is new enough, just use renameat2() with RENAME_EXCHANGE
1 reply 1 retweet 1 like
http://man7.org/linux/man-pages/man2/rename.2.html … - atomic exchange operation
4:47 AM - 11 Sep 2016
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.