It would not work.
A hard link does not preserve the contents of files, just the pointer to those contents. So in case of files, file modifications are not preserved, and for directories that means changes in the contents of directories would not be preserved either. As (down under) each file is deleted individually. Even if you could hard link a directory, it would just be empty afterwards all the same.
Hardlinks are usually disallowed for directories in the first place. Symlinks for directories are already problematic, there are hacks in place to prevent a infinite symlink loop to be followed down to deep. At least for symlinks they're easily identified and simply ignored, most programs that walk directory trees (such as find
) ignore them completely (never follow them) by default.
Hardlinked directories would be harder to detect and keep track of, as you cannot tell which one you already visited, you'd have to check for each directory whether it's one of the already visited ones. Most programs don't do this as they simply expect that by convention this thing does not exist in the first place.
If you still need to hardlink directories for some reason, there is something that does something very similar, and that's mount --bind olddir newdir
. Bind mounts do not have some of the pitfalls, e.g. no infinite structures as the mount is locked to one place and does not repeat unto itself. In exchange it has others (other submounts do not appear in this tree either). Which is a great feature if you're looking for files hidden by other mounts.
There is no preservation of contents in either case, for that you always need a real copy.