Tar -x could change your symlinks to directories

I encountered the problem, that /usr/lib64 wasn’t a symlink anymore. The reason was a script which installed files into /usr/lib64 by tar -x …
The problem is also described at
linux - How to prevent tar extraction from overwriting symbolic links directories - Stack Overflow.

How to prevent tar -x correctly from replacing symlinks to directories?

The solution seems to be in “man tar”:

Don’t replace existing symlinks to directories when extracting.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.