Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy files between two linux boxes

Status
Not open for further replies.

moogeboo

MIS
Aug 7, 2003
28
0
0
US
Hi,

I am a beginning Linux user trying to copy files between two ESX 2.5.3 machines running Linux. Is there a method to copy files that have a bunch of spaces in between?

source:/vmfs/esx1/file that lives here.vmdk
destination: vmfs/archive

scp root@destination:/vmfs/esx1/???.vmdk /vmfs/archive/

Thanks for any help.

Moogeboo

 
Hi moogeboo,

I am not too sure about your question (what do you mean but 'a bunch of spaces in between? is that the file name)'but VMWare machines behave as real servers so you have a couple of options to copy files across.

scp is certainly one of them, you may want to use the "-r" option to copy directories recursively.
Other option could be rsync.


From your example it seems like you are trying to copy the VMWare virtual disk's files. In this case it is not a matter of linux operating system but it is a matter of the host's machine operating system. YOu can copy .vmdk files as normal files, once the guest system is not running.

Cheers

QatQat



Life is what happens when you are making other plans.
 
You could try enclosing the names of the files with spaces with quotes.

I don't mind people who aren't what they seem. I just wish they'd make their mind up.

Alan Bennett.
 
Thanks for the replies..To clarify, lets say i have this file in the following path for esx1:

vmfs/hba:0:1:0:1/NT 4.0 Standard # 1.vmdk

so if i wanted to copy it to esx2, what would i need to type in?

I tried the following and they haven't worked:

scp root@esx2:/vmfs/hba:0:1:0:1/"NT 4.0 Standard # 1.vmdk" /vmfs/home

and this:

scp root@esx2:"vmfs/hba:0:1:0:1/NT 4.0 Standard # 1.vmdk" /vmfs/home

Am i missing something?

Thanks!
Moogeboo
 
I would have expected quotes to do it. Try escaping special characters with "\" instead.

vmfs/hba\:0\:1\:0\:1/NT\ 4.0\ Standard\ #\ 1.vmdk

 
This worked for me:

[tt]scp root@esx2:/vmfs/hba:0:1:0:1/'NT\ 4.0\ Standard\ #\ 1.vmdk' /vmfs/home[/tt]

The remote filespec seems to be evaluated twice, so the quotes handle it for the local shell, and the \ escapes do so at the remote end, if that make sense. You only need to escape the spaces.


Annihilannic.
 
thanks annihilannic. that worked!

However, I have a bunch of other files in this format:

vmfs/hba:0:1:0:1/NT 4.0 Standard # 5 (NT4LABSRV).vmdk

I tried using \ escapes but it seems to have trouble with the parentheses (NT4LABSRV). Any idea how this can be done?

Thanks,
Moogeboo
 
This should work (escape the parentheses/brackets as well):

[tt]scp root@esx2:'vmfs/hba:0:1:0:1/NT\ 4.0\ Standard\ #\ 5\ \(NT4LABSRV\).vmdk' /vmfs/home[/tt]

Annihilannic.
 
Annihilannic,

This is what i typed exactly:

scp root@esx2:'vmfs/hba:0:1:0:1/NT\ 4.0\ Standard\ #\ 5\ \(NT4LABSRV\).vmdk' /vmfs/home

and it did not work. I tried removing the single quotes and it still did not work. When I hit enter there is no screen output and I need to hit Ctrl+C to break it.

Are the quotes in the right place?

Thanks,
Moogeboo

 
Strange.. are you using any unusual shells at either end? What version of ESX?

Annihilannic.
 
I'm using ESX 2.5.3. The standard, with nothing else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top