Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Copy files from Windows to Linux

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

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses

636 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