dereference (GNU tar 1.35.90)

Next: , Previous: , Up: Making tar Archives More Portable [Contents][Index]


8.3.2 Symbolic Links

Normally, when tar archives a symbolic link, it writes a block to the archive naming the target of the link. In that way, the tar archive is a faithful record of the file system contents. When --dereference (-h) is used with --create (-c), tar archives the files symbolic links point to, instead of the links themselves.

When creating a portable archive from a directory that adversaries cannot modify, consider using --dereference (-h): some systems do not support symbolic links, and moreover, your distribution might be unusable if it contains unresolved symbolic links. See Symbolic Links.

When reading from an archive, the --dereference (-h) option causes tar to follow an already-existing symbolic link when tar writes or reads a file named in the archive. Ordinarily, tar does not follow such a link, though it may remove the link before writing a new file. See Options Controlling the Overwriting of Existing Files.

The --dereference option is unsafe if an untrusted user can modify directories while tar is running, or if extracting from an untrusted archive into a nonempty directory. See Security.

AltStyle によって変換されたページ (->オリジナル) /