Solved

Copy files from Windows to Linux

Posted on 2014-01-20
8
435 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
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 90

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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 37

Expert Comment

by:Gerwin Jansen
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 37

Expert Comment

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

706 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

13 Experts available now in Live!

Get 1:1 Help Now