View previous topic :: View next topic |
Author |
Message |
dhewton Guru
Joined: 14 Aug 2004 Posts: 461 Location: Canada
|
Posted: Tue Sep 14, 2004 9:14 pm Post subject: Need help with tranfering big files |
|
|
This is from another post:
This worked like a dream.
Here is my challenge. The /tmp dir is very small. the "My Pictures" dir is several gigs. Is there no way I could just recursively sftp the contents of a directory?
Also, some of the directorys are odd names: My Excell Dos (perblahblah). Because of the (perblahblah) I cannot resolve the address. How do I tell tar where to look for this. It handles My Exell Docs no probs, but the bracketed dirs don't get seen.
Being able to just recursively sftp would be the easiest.
Any ideas?
Thanks.
Dan
To transfer this file, if you initiate the sftp from the livecd box, you will do:
Code:
cd /tmp
lcd /tmp
put your_directory.tar.gz
quit
This will copy the tar.gz file to your linux box in the tmp folder. To unzip/untar it in the target folder, you will do:
Code:
cd target_folder
tar xzvf your_directory.tar.gz
[/quote]
_________________
Dan Hewton _________________ DannyBoy |
|
Back to top |
|
|
fleed l33t
Joined: 28 Aug 2002 Posts: 756 Location: London
|
Posted: Tue Sep 14, 2004 9:34 pm Post subject: |
|
|
You could try piping the output of tar through a ssh pipe. Something like
tar -cjf - /dirtobecopied | ssh user@host "cat - | tar -xjf -"
should work. You might also want to specify blowfish as the encryption algorithm so your cpus are not too taxed (-c blowfish as a param of ssh). |
|
Back to top |
|
|
nielchiano Veteran
Joined: 11 Nov 2003 Posts: 1287 Location: 50N 3E
|
Posted: Wed Sep 15, 2004 1:52 pm Post subject: |
|
|
fleed wrote: | tar -cjf - /dirtobecopied | ssh user@host "cat - | tar -xjf -"
|
can be shorter:
Code: | tar c[zj] /dirtobecopied | ssh user@host "tar x[zj]" |
change [zj] to either z (for gzip, faster) or j (for bzip2, more efficient) depending on how much processor you have to spare
tar default to standard output, so the f - isn't needed; it also defaults to standard input, and "cat -" just does nothing else then pipe everything throug. |
|
Back to top |
|
|
|