[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: files not deleted on remote machine with --cleanup
From: |
James Gibbon |
Subject: |
Re: files not deleted on remote machine with --cleanup |
Date: |
Mon, 20 Dec 2010 13:05:40 +0000 |
On Mon, 20 Dec 2010 12:12:13 +0000
James Gibbon <jg@jamesgibbon.com> wrote:
>
> $ ls -d *.wav | parallel -j+0 -Ssauce,: --workdir /tmp \
> --cleanup --transfer --return {.}.flac /usr/bin/flac {}
>
> Shouldn't the --cleanup flag cause all transferred wavs to be
> deleted on the remote machine? I'm using version 20101113.
>
OK. Apologies for replying to my own email, but here's the problem.
Running the above with -vv -D shows what's happening under the
hood:
ssh sauce mkdir -p /tmp; rsync -rlDzRE -essh ./ziggy001.wav sauce:/tmp;ssh
sauce PARALLEL_SEQ=$PARALLEL_SEQ\;export
PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; cd\ /tmp\ \&\&\
/usr/bin/flac\ ziggy001.wav;_EXIT_status=$?; rsync -rlDzRE -essh
--remove-source-files sauce:/tmp/./ziggy001.flac ./;ssh sauce rm -f
ziggy001.wav ; exit $_EXIT_status;
.. the trouble is the "rm -f" that's invoked to remove the transferred
file isn't aimed at the directory specified by '--workdir'. It would
work fine if I was using my home directory, but I'm not. I think it needs
to do ssh sauce "cd /tmp && rm -f ziggy001.wav".
Cheers,
James
--