Peterson50
asked on
copying file from one sles box to another
What command would one use in Suse Linux to copy a file in terminal from one linux machine to another? One has the ip address of 192.168.0.245 and contains a file I want to transfer to a server with an ip of 192.168.0.13. I tried using scp couldn't get it to work after I archived the info I needed into a tar file. Is there another command that works better?
Thanks
Thanks
If you're attempting to use scp to pull files from a remote machine that exist within a tar archive, you probably won't have much success; you may want to consider either extracting the contents or using some scripting over ssh to get it done:
Using this code, you can extract the file and copy it over the SSH tunnel (similar to scp), echo its contents, etc. Google for information on the tar command and you should find what you need. If you need more info, let me know.
ssh 192.168.0.13 "tar zxf file.tgz (options)"
Using this code, you can extract the file and copy it over the SSH tunnel (similar to scp), echo its contents, etc. Google for information on the tar command and you should find what you need. If you need more info, let me know.
ASKER
The server at .0245 has a barebones linux installation as we are attempting to perform a disaster recovery. Since we had an issue with it we needed to zip a directory which we did and now copy that to another machine using some utility. I was attempting to copy the entire tar file I created from one machine to another and though it would work. How do I redirect the ssh tar extration to a folder on my in use system (not the barebone system which contains the tar)
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked perfectly
See:
http://linux.softpedia.com/get/System/Software-Distribution/rsync-192.shtml
http://www.cyberciti.biz/tips/linux-use-rsync-transfer-mirror-files-directories.html