perfectly_dark
11-21-2003, 07:20 PM
I have a working FTP script that FTPs a file using the put() function. I am trying to upload an entire folder. Is there an easy way of doing this? Thanks in advance
|
Click to See Complete Forum and Search --> : FTP'ing Folders in Perl perfectly_dark 11-21-2003, 07:20 PM I have a working FTP script that FTPs a file using the put() function. I am trying to upload an entire folder. Is there an easy way of doing this? Thanks in advance scinerd 11-22-2003, 10:36 AM you could use something like this: tar -cf - ./tst |(ssh localhost tar -xBpf -) This tars up the local tst directory and pipes it over ssh to the remote host and extracts it. If you are moving a lot of data I would compress it then uncompress it at the far end so you cut down on network traffic. This is also more secure then ftp since it doesn't transmite your password in clear text. If you need to change directory when you loging because you start in your home dirctory use can do this tar -cf - ./tst |(ssh localhost "cd somedir;tar -xBpf -") perfectly_dark 11-24-2003, 05:06 PM ok, I know this is a Linux board but does any one know if/how I can set up an ssh server on a Windows 2000 Server? Im backing stuff up on to the windows machine from my linux box. Thanks ph34r 11-24-2003, 05:14 PM There are a few Win32 sshd's - check www.tucows.com for them. perfectly_dark 11-24-2003, 05:34 PM thanks! scinerd 11-24-2003, 09:07 PM the other way to do this is to mount a windows share with smbmount and then do a straight tar of the data. That way you don't need to setup a ssh server on the windows box. Also the commands I gave only work if the remote system is a linux box. Granted if you are doing this over the internet mounting a share isn't a option. Use perl with the expect mod to mount the file system then use system to run your tar. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |