Link to home
Start Free TrialLog in
Avatar of Peterson50
Peterson50Flag for United States of America

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
Avatar of Joseph Gan
Joseph Gan
Flag of Australia image

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:

ssh 192.168.0.13 "tar zxf file.tgz (options)"

Open in new window


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.
Avatar of Peterson50

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
ASKER CERTIFIED SOLUTION
Avatar of crazedsanity
crazedsanity
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Worked perfectly