What is a good command for moving a directory containing relative symbolic links to files outside the directory?
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite I like to use relative symlinks when possible because they stay valid even when my filesystem is mounted in a non-root location, for example if I am accessing it remotely. However, if I move a directory which contains relative symlinks, in general those links become invalid. I am looking for a command that I can use to move a whole directory (tree), rewriting only those relative symlinks that point outside the directory so that they still point to the same files. There is a related question on Stack Overflow, How do I move a relative symbolic link?. Also, here on Unix & Linux, find all symbolic links in a directory tree pointing outside that tree, and (referring to a much harder problem) is there some kind of symbolic links that support moving or renaming the target file?. For example, a command called mv-rel which behaves as follows (the other commands being their GNU coreutils versions): $ mkdir foo $ touch...