-   Linux - Newbie (
-   -   copying files from another computer(win) (

lin00b 07-26-2004 02:53 AM

copying files from another computer(win)
hey all,

I think this is a pretty n00b question, so I decided to ask it here. How do you copy files from another networked machine, which happens to be a Windows machine and move them to a Linux machine. I already have Samba up and running and everything is being seen on the network and I can manually copy files from Windows machines to the Linux one, however I would like to know of a command or script that does it so I can make copying files into a batch job. :)

Dark_Helmet 07-26-2004 04:22 AM

Once the Windows share is mounted on a linux machine, you can treat it just like any "normal" directory in Linux. You can use wildcards, copy entire directories, or whatever.

Not sure what you would need a script or special command for... More details about the situation are needed (what files, where, and where are they supposed to be copied to) if you want some help automating things.

Lawful 07-26-2004 07:49 AM

I am 99.0002% sure that you can write a batch script that can do this using FTP.

lin00b 07-26-2004 10:45 PM

I've worked out how to use the copy command and stuff, but to use it I firstly need to mount the Windows share, I've been trying to do this with the smbmount command aswell as the mount command and I feel I'm really close but somethings stuffing up, I think I'm not writing the source address correct; should it be something like smb://bob/trt-ehanks/Backups (example source) and then the destination would be /mnt/Backup or something. My problem might lie with the extra commands that come with the smbmount command such as password identification... Help.

Dark_Helmet 07-26-2004 11:55 PM

Well, unfortunately, I don't use Samba myself, but after a little searching with Google, I found this:
Red Hat message

In it, it basically says a guy successfully managed to mount a Windows share with a command like:

smbmount  //windows_host/share_name /mnt/point -o username=user,password=pw -u 500 -g 501
Obviously, you need to replace windows_host, and share_name with the right values for your Windows machine. Of course, /mnt/point is just the directory path to where you want to mount the share. Everything else depends on your setup. If your Windows share is password protected, then you'll need to give a username and password. The -u and -g just specify the owner's user ID and group ID for the mounted filesystem, but the guy in the above message seemed to have problems getting that to work.

Give that a shot, and see if it mounts...

shenoy 07-27-2004 03:53 AM

If you have a gui I would suggest you have a look at LinNeighborhood.Compiling it is a breeze and you'll love it.I do.

All times are GMT -5. The time now is 10:30 AM.