Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need help with tranfering big files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dhewton
Guru
Guru


Joined: 14 Aug 2004
Posts: 461
Location: Canada

PostPosted: Tue Sep 14, 2004 9:14 pm    Post subject: Need help with tranfering big files Reply with quote

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
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Tue Sep 14, 2004 9:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Wed Sep 15, 2004 1:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum