[cs615asa] [CS615] Handling Symbolic Links
Jan Schaumann
jschauma at stevens.edu
Wed May 2 21:17:17 EDT 2018
Patrick C Murray <pmurray1 at stevens.edu> wrote:
> How should symbolic links be handled in HW6?
You wouldn't need to worry - tar(1) will do the right thing:
If the argument given is a symlink and you do not append the '/', then
tar(1) will only copy that one file (of type symlink).
If the argument given is a symlink to a directory and you do append '/',
then tar(1) will indirect through the symlink and process the
directory.
If the argument is a directory and it contains symlinks, then tar(1)
will copy them as a file of type symlink, as it should.
This hopefully makes sense and should not violate the principle of least
astonishment. That is, this is the behaviour that a user most likely
expects, and that matches the behaviour of other unix tools.
-Jan
More information about the cs615asa
mailing list