Skip to main content
5 events
when toggle format what by license comment
Sep 8, 2021 at 0:12 comment added jrw32982 @Gilles'SO-stopbeingevil' It looks like it is possible using the 2 techniques in the other answers. 1) use rename system call with mv -T, or 2) use mv to move the new symlink with the correct (target) name already, located in a temp dir in the same filesystem as the target dir, to the target dir (containing the target symlink).
Dec 24, 2010 at 17:28 history edited Warren Young CC BY-SA 2.5
Added sentence explaining why I started with symlink(2) info; it may be seen as a non sequitur by one who doesn't understand that both Busybox and GNU mv are built on this same foundation
Dec 24, 2010 at 13:39 vote accept Shawn J. Goff
Dec 22, 2010 at 19:13 comment added Gilles 'SO- stop being evil' Indeed, there is unfortunately no way you can modify a symbolic atomically. The best you can do is remove the old link and create a new one. GNU coreutils has an option to do this with a single command (ln -snf), but there are still two system calls under the hood.
Dec 22, 2010 at 15:37 history answered Warren Young CC BY-SA 2.5