LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 01-15-2009, 12:37 PM   #1
topsy999
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
how to move files from windows server to linux server by script


Hi,

I would like to move a directory from a windows box to linux box. Both have user names and passwords that we use. For example I use securecrt to ssh in the linux with a username/password and I use windows remote desktop to login to the windows box.

How do I do this and where do I run this script from?

Thanks
Anup
 
Old 01-15-2009, 01:39 PM   #2
mk27
Member
 
Registered: Sep 2008
Distribution: fedora, gentoo, ubuntu
Posts: 148

Rep: Reputation: 23
Investigate NFS (network file system) usable by both OS's. This allows you to mount a remote directory the same way you would mount a cdrom, etc. It requires configuration at both ends, but once set up the commands are fairly simple and you should easily be able to write a script to mount the "share", copy, and dismount it.
 
Old 01-15-2009, 01:40 PM   #3
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,102

Rep: Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719
Quote:
Originally Posted by topsy999 View Post
Hi,

I would like to move a directory from a windows box to linux box. Both have user names and passwords that we use. For example I use securecrt to ssh in the linux with a username/password and I use windows remote desktop to login to the windows box.

How do I do this and where do I run this script from?

Thanks
Anup
You can do it from either side, using whatever you want. Your question is kind of vague, and has many answers.
  1. You can either use smbclient/smbmount, to mount a shared Windows folder on your Linux system, and use a Linux script (again, many answers; bash, perl, etc....), to copy the files/folders.
  2. You can set Linux up to have an NFS share, and use a Windows NFS client to mount it, and use a Windows script (????) to copy the files....
  3. You can setup Samba on Linux, and just map a network drive from Windows to Linux, and copy the files via script (???)
  4. You can use SCP from either system, to copy the directory over via script (again, written in whatever you want, on either system)

Short answer: you can run the script from either Windows or Linux, and there are lots of ways to mount/map a network drive, or copy files. None are necessarily any better or worse than any other, without knowing alot more. What's your programming skill set like? What languages? How much scripting have you done? Do you know how to set up/map network services? How often is this done?

Analyze your requirements first.
 
  


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 execute a ssh script on Linux server from Windows through a bat script? wanna13e Programming 13 10-23-2009 03:41 AM
PHP Login script working on windows server but not on Linux Red Hat Server ahmedyk Linux - Newbie 2 01-14-2009 01:22 AM
Linux File Server - Newbie looking to make the move from Windows BillyLitt Linux - Newbie 3 11-03-2008 02:45 PM
Move uses and groups to new linux server from old server lee@rocklage.com Fedora 1 12-04-2007 10:50 PM
Move user files from Samba server to new samba server TheB2B Linux - Server 3 11-10-2007 09:30 PM


All times are GMT -5. The time now is 11:31 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration