Solved

copying file from one sles box to another

Posted on 2010-11-28
5
543 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:Peterson50
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Joseph Gan
Comment Utility
0
 
LVL 9

Expert Comment

by:crazedsanity
Comment Utility
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.
0
 

Author Comment

by:Peterson50
Comment Utility
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
0
 
LVL 9

Accepted Solution

by:
crazedsanity earned 500 total points
Comment Utility
I would just scp the entire zip file to the destination server:

scp user@192.168.0.245:/path/to/file.tgz /path/to/temp/destination

Open in new window


After that, just unzip the file:

cd /path/to/destination; tar zxvf file.tgz

Open in new window


Once that is done, you can move the data from the extracted directory to wherever it needs to be.
0
 

Author Closing Comment

by:Peterson50
Comment Utility
Worked perfectly
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now