[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parallel does not preserve symlinked directory structure on remote

From: Benjamin Leutner
Subject: Re: parallel does not preserve symlinked directory structure on remote
Date: Wed, 21 Jun 2017 17:38:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

adding the -K flag (=treat symlinked dir on receiver as dir) to the rsync call in rsync_transfer_cmd() would solve this issue.

some scenarios (following my initial example) for what would happen on the remote machine:

wd is a valid softlink:                -> no action
wd is a directory:                     -> no action
wd is a broken softlink:            -> directory wd is created
wd is missing:                          -> directory wd is created

Could you add this to parallel?
It is a slight change of behavior compared to previous versions, but I can't imagine a scenario where it would do harm.


On 06/12/2017 08:52 PM, Benjamin Leutner wrote:

when parallel transfers a file to a remote machine, e.g. a basefile, it creates the required directories on remote if they don't exist and uses pre-existing directories otherwise. However if the target directory on the remote machine is a symlink to another directory, it will replace it with a directory instead of putting the transfered file into the linked target directory.

An example:

# on remote:
mkdir remoteLinkTarget
ln -s $HOME/remoteLinkTarget $HOME/wd

# on local
mkdir wd
touch wd/testfile

parallel --nonall --sshloginfile remoteHosts --basefile wd/testfile

# wd on remote is now a directory containing the testfile and the symlink is gone # I would have expected testfile to be placed physically under $HOME/remoteLinkTarget/testfile

Is it intended to behave like that?

Version: GNU parallel 20170522


reply via email to

[Prev in Thread] Current Thread [Next in Thread]