Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 3 virtual machines and i fixed them as a team and in 1 local host now they can ping each other and see each other now how can I write a command to send 1 file from a virtual machine to another?

How to do this kind of file transfer? Is there any utility for this?

I have 2 opensuse gnome os and 1 opensuse kde

I have OpenSUSE running on all the three machines.

share|improve this question

migrated from stackoverflow.com Jan 9 '12 at 7:03

This question came from our site for professional and enthusiast programmers.

1  
What does tc means in the title? Is it a typo for the ? –  Basile Starynkevitch Jan 8 '12 at 19:59
    
No tc is a command in linux which you can make scripts tc is abbreviation of traffic controller –  Nickparsa Jan 14 '12 at 15:09
    
when sharing a file from os1 to os3 the os2 which is in the middle and has 2 network cards(net adapters) should output the traffic but I really don't know what should i do? –  Nickparsa Jan 14 '12 at 15:11
    
@nikparsa - Your last comment is significantly different than your original question, in which you stated that you had IP connectivity between the machines ("can ping each other"). If you now have another setup, and if os1 to os3 no longer have standard IP connectivity with each other, please open a new question detailing the new configuration. –  ziesemer Jan 20 '12 at 15:01
    
(Actually, he already did: superuser.com/questions/376070/…) –  ziesemer Jan 20 '12 at 15:02

2 Answers 2

It sounds like you have standard IP connectivity, which makes the fact that you're using VMs pretty much irrelevant. I'd just use scp.

just type man scp to get more info in this command.

share|improve this answer
    
scp [[user@]host1:]file1 ... [[user@]host2:]file2 does the trick –  Matt H Jan 9 '12 at 9:32

The most basic file transfer can be handle with netcat [nc].
In the following example, we transfert filename from a virtual machine (IP=a.b.c.d) to another one (VM2) using the port 8000:

  • on VM2 run: nc -l 8000 > filename
  • on VM1 run: nc a.b.c.d 8000 < filename

(if the port 8000 is blocked you can use another one)

OK, this is the most basic solution to use when NFS/rcp/scp/ftp are not available.

Note that, rsync may be the best file transfer tool when updating files (e.g. appending new data always at the end).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.