[Trilug-ontopic] [bash] copying `find`ed files across network
Brian McCullough
bdmc at buadh-brath.com
Wed May 23 17:41:07 EDT 2012
On Wed, May 23, 2012 at 05:19:04PM -0400, Tom Roche wrote:
>
> http://www.trilug.org/pipermail/trilug-ontopic/2012-May/000315.html
> Tom Roche Wed, 23 May 2012 15:36:07 -0400
> >> I'm trying to copy a buncha files across a network. Something is
> >> horribly wrong, improvements or alternatives appreciated. I've got
>
> >> me at remote:~ $ find /work/MOD3EVAL/nsu/boundary/BLD_ddm_saprc07tc -type f | grep -ve 'CCTM\|CVS\|~$\|\.o$' | sort | xargs du -ch | tail -n 1
> >> > 36M total
>
> >> and I want to copy only those files.
>
> Alan Porter Wed May 23 15:45:15 EDT 2012
> > How about this?
>
> > tar -zcf - $(find /work/MOD3EVAL/nsu/boundary/BLD_ddm_saprc07tc -type f | grep -ve 'CCTM\|CVS\|~$\|\.o$') | ssh root at remote "tar -zxvf -"
>
> I don't have root on remote, and I don't wanna restore there ...
> but making a similar adjustment adds a datapoint (starred below):
I suspect that it is because of the order of the parameters.
"f" requires a value, which it is, I suspect, taking as the letter "z".
Brian
More information about the Trilug-ontopic
mailing list