[Trilug-ontopic] [bash] copying `find`ed files across network

Alan Porter porter at trilug.org
Wed May 23 15:45:15 EDT 2012

> 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

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 -"

# ɹǝʇɹoԀ uɐl∀

More information about the Trilug-ontopic mailing list