?
Solved

Copy files from Windows to Linux

Posted on 2014-01-20
8
Medium Priority
?
446 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 97

Expert Comment

by:Experienced Member
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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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 1170 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…
Suggested Courses

770 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