LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2010, 03:50 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
How to transfer file from linux machine to windows machine?


hi guys ,

I want to make a script which will copy the certain data from Linux machine to Windows machine.

Can u please give me some help in how would i go about it?
 
Old 04-09-2010, 03:52 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by pinga123 View Post
hi guys ,

I want to make a script which will copy the certain data from Linux machine to Windows machine.

Can u please give me some help in how would i go about it?
You can create a samba server and put the data in the shared folder, then windows client will be able to access them.
 
Old 04-09-2010, 04:11 AM   #3
Andrew Dufresne
LQ Newbie
 
Registered: Sep 2009
Distribution: Fedroa 10
Posts: 27

Rep: Reputation: 16
Quote:
Originally Posted by pinga123 View Post
hi guys ,

I want to make a script which will copy the certain data from Linux machine to Windows machine.

Can u please give me some help in how would i go about it?
Though you have asked about a script, but rdesktop might be enough for the job.
 
Old 04-09-2010, 04:15 AM   #4
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by Andrew Dufresne View Post
Though you have asked about a script, but rdesktop might be enough for the job.
What is rdesktop.
Currently i m going through Samba document.But i dont want to create a special share i want to copy data located in /tmp/data to a window server say \\abc\data
Can i achieve this using rdesktop or samba server?
 
Old 04-09-2010, 04:17 AM   #5
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
I want to edit the configuration file for samba server.

What should i write in netbios and workgroup name?
How would i determine workgroup and netbios name?

[global]
workgroup = WKG
netbios name = MYNAME
[share1]
path = /tmp
[share2]
path = /my_shared_folder
comment = Some random files
 
Old 04-09-2010, 04:30 AM   #6
bakdong
Member
 
Registered: Apr 2009
Posts: 214

Rep: Reputation: 44
You don't need to set up a server for this task. Just use the samba client to connect to the windows share and copy the file(s) across.

You can use the -c option to specify commands on the command line for scripting:

Code:
smbclient \\\\servernetbiosname\\sharename -U user password -c put file1.doc

Last edited by bakdong; 04-09-2010 at 04:44 AM. Reason: Added example code
 
Old 04-09-2010, 04:31 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
If the windows computer already has a share set up, you don't need to run samba on you Linux computer. You can mount the windows share,then in your script simply copy the files over.
 
1 members found this post helpful.
Old 04-09-2010, 08:21 AM   #8
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
this looks like a job for rsync / rsnapshot
 
Old 04-09-2010, 10:38 AM   #9
Andrew Dufresne
LQ Newbie
 
Registered: Sep 2009
Distribution: Fedroa 10
Posts: 27

Rep: Reputation: 16
Quote:
Originally Posted by pinga123 View Post
What is rdesktop?

Hi Pinga,

When I first came across the need to transfer files from Linux to Windows and vice versa, the idea of using Samba seemed tempting.

But later I found out about rdesktop which, to me at least, is much easier than Smaba, because it requires no formal configuration.

Windows offers remote desktop feature. Enable it on the windows machine. I think you have to right click on My computer, then properties and then click on the tab labelled Remote Desktop. Then check the appropriate check boxes. Lets say windows machine has IP 192.168.1.61

Now, if rdesktop is installed on your Linux box:

Code:
rdesktop  192.168.1.61
Now you can access the windows machine from your Linux box.

or use

Code:
rdesktop -u <username on windows machine> -p password 192.168.1.61
To share files, mount a partition with ntfs or fat32 file system - a system that Windows can read - it can be a usb, memory card or a partition on HDD.

Lets say, I mounted my flash drive in /media/3/ folder, then

Code:
rdesktop -r disk:usb=/media/3/  192.168.1.61
Now your mounted partition will appear in My Computer and you can easily transfer files from one machine to other.

Hope it was helpful.

Regards

Last edited by Andrew Dufresne; 04-09-2010 at 10:43 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to watch linux client machine desktop(activities) from windows machine deepak rawat Linux - Networking 7 07-03-2006 05:59 PM
how to shutdown,restart and log off windows machine remotely through a linux machine deepak rawat Fedora 1 05-23-2006 02:25 AM
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 11:20 AM
How to Transfer files between Linux machine and Window Machine rktech83 Linux - Networking 7 03-14-2006 04:10 AM
I canít transfer files from my Windows machine to my Linux box. kingkongadp64 SUSE / openSUSE 10 11-04-2005 01:16 PM


All times are GMT -5. The time now is 04:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration