Solved

Copy files from Windows to Linux

Posted on 2014-01-20
8
443 Views
Last Modified: 2014-01-29
I am using Cygwin.  What are the best commands to copy files from a windows client to a Red Hat client using Cygwin.
0
Comment
Question by:gumball60
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Expert Comment

by:tmx84
ID: 39794616
SSH? SCP? Samba?

Which way are you trying to connect?  Connecting from Linux to Windows or vice versa?  If they are on the same workgroup/domain, you could setup a Samba Client and just share the files on Windows... There are lots of ways to do it, but you have to connect the two PC's before you can just send commands... Or even setup a Samba server and just create a share folder that you connect to from windows and copy the files over via file share..

Cygwin isn't really going to help you so to speak unless you are trying to setup an SSHD on the windows machine rather then the Linux Machine...
0
 

Author Comment

by:gumball60
ID: 39794673
I am connecting from windows to linux.  Both Windows and Red Hat are in the same domain.
Samba is installed
0
 
LVL 95

Expert Comment

by:John Hurst
ID: 39794677
I have used Samba to connect Windows and Linux. It takes some learning and some setup, but it does work.

Is this an ongoing thing?  Then Samba. Or is this one time? Then consider just using a USB key. That is easy and should work.

.... Thinkpads_User
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
LVL 4

Expert Comment

by:tmx84
ID: 39794693
So Samba is currently installed on the Linux Machine?  If so, Share out a folder on Windows, make sure you set the security settings correctly.  Go over to your Linux machine, not sure if it's CLI or GUI, if it's GUI, go to Files, Click on Connect to Server, you will type in smb://XXX  XXX being Ip address of Windows machine.  Click connect, should give you a credential screen, type in the correct credentials and you should have access to the folder share...

Or you could do the reverse, and share out a folder on the linux machine and connect to it from the windows machine (you will not need cygwin for this).  

Here is a link how to share a directory in Red Hat...

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/sect-Managing_Confined_Services-Samba-Configuration_examples.html#sect-Managing_Confined_Services-Configuration_examples-Sharing_directories_you_create
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39795220
Basic and simple: using (s)ftp.

Connect from cygwin to Linux:  (s)ftp <linux_host>
(enter username and password)

put (or mput) your files to the Linux host.
0
 
LVL 16

Expert Comment

by:AlexPace
ID: 39795455
Regular plain FTP will convert the line endings if you transfer files in ASCII mode.... this is handy if you are moving text files but otherwise you'll want to be sure to do the transfer in Binary mode so the files don't get horked.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39795643
To set binary mode in FTP, type: bin on the FTP prompt...
0
 
LVL 30

Accepted Solution

by:
serialband earned 390 total points
ID: 39798843
Cygwin should have ssh and scp.  You run the installer again to install them if you haven't done so yet.

scp cygdrive/c/FOLDER/FILE username@remotehost:./FOLDER

If you're not familiar with the command line and want a GUI, I'd suggest WinSCP instead.  http://winscp.net/eng/index.php

If Samba is installed on Linux, you can create the shares there and just mount the share on your Windows system.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Log files are useful in diagnosing and repairing problems.  This is a list of common log files and their standard locations that I've compiled.   While this is not exhaustive, it is a pretty good list that I've found to be useful.  I may update it f…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

696 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