Re: scp'ing 250,000 files
- From: William Park <opengeometry@xxxxxxxx>
- Date: Wed, 26 Jul 2006 10:04:07 -0400
Michael Heiming <michael+USENET@xxxxxxxxxxxxxx> wrote:
In comp.unix.shell Digital Puer <digital_puer@xxxxxxxxxxx>:
Hi, I have a huge set of 250,000 files (each about 15KB) that I need
to transfer from one machine to another. I would prefer to use scp.
These files have a .dat extension, but there are others (executables,
.txt files, etc.) interspersed between them. I would like just do
"scp *.dat ..." but the command-line is saying that there are too
many arguments. I would prefer not to scp the whole directory,
since there are too many non-.dat files to be transferred.
The host machine is Windows with Cygwin running tcsh. The
destinatoin machine is Linux.
The general solution is to use find, pipe though tar, pipe to ssh
on the remote machine, change dir and use tar to unpack on the
remote system in a single line.
find /dir -name '*.dat" | tar -cvzf - -T - | ssh remotehost "cd /; tar -xvzf -"
While this should work flawlessly on unix or alike, dunno about
cygwin + doze?
I didn't know stdin to ssh is sent over to remote machine. I've doing
it using netcat.
--
William Park <opengeometry@xxxxxxxx>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
.
- References:
- scp'ing 250,000 files
- From: Digital Puer
- Re: scp'ing 250,000 files
- From: Michael Heiming
- scp'ing 250,000 files
- Prev by Date: Re: how to make my deamon depends on other
- Next by Date: Re: How to get the version of any program?
- Previous by thread: Re: scp'ing 250,000 files
- Next by thread: Re: scp'ing 250,000 files
- Index(es):
Relevant Pages
|
|