You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first time the command is executed (and so no symlink exist yet) the first definition of ln is called: ln [OPTION]... [-T] TARGET LINK_NAME. And the program creates a symlink LINK_NAME pointing to TARGET, which from now on will be treated as a directory.
The second time the same command is executed, as now LINK_NAME does exist and is treated as a directory, the third definition of ln is called: ln [OPTION]... TARGET... DIRECTORY, which creates a symlink of TARGET inside DIRECTORY, which in our case is the "directory" LINK_NAME which has been created in the first run.
As a consequence a recursive symlink is created inside LINK_NAME, producing the following structure
which can produce unwanted results when mixed with backup or synchronization programs.
The problematic behavior can be solved by adding the --no-target-directory or -T option when creating the symlinks, which force to treat LINK_NAME as a file always, which will be overwritten when combined with the -f option.
The text was updated successfully, but these errors were encountered:
Oh thanks! I noticed those nested symbolic links already but I didn't find any quick fix on this and didn't have the time to investigate completeley. This helps a lot! I already edited the shortix.sh. So updating using the desktop icon should work now. Maybe you can try it, I will later today.
The command
ln
behaves differently if the second argument is a link name or a directory (see https://man7.org/linux/man-pages/man1/ln.1.html).The first time the command is executed (and so no symlink exist yet) the first definition of
ln
is called:ln [OPTION]... [-T] TARGET LINK_NAME
. And the program creates a symlink LINK_NAME pointing to TARGET, which from now on will be treated as a directory.The second time the same command is executed, as now LINK_NAME does exist and is treated as a directory, the third definition of
ln
is called:ln [OPTION]... TARGET... DIRECTORY
, which creates a symlink of TARGET inside DIRECTORY, which in our case is the "directory" LINK_NAME which has been created in the first run.As a consequence a recursive symlink is created inside LINK_NAME, producing the following structure
which can produce unwanted results when mixed with backup or synchronization programs.
The problematic behavior can be solved by adding the
--no-target-directory
or-T
option when creating the symlinks, which force to treat LINK_NAME as a file always, which will be overwritten when combined with the-f
option.The text was updated successfully, but these errors were encountered: