Samba – how copy file to windows server from linux

filessamba

I have a file on CentOS machine that needs to be copied to Windows NT server.

I use \10.10.10.10 to connect to the server from my windows desktop. I can copy the files using the GUI,

but I want to write a shell script on my centOS server that will periodically copy files to windows box.

Best Answer

Mount the Windows NT server on your CentOS machine:

mkdir /mnt/windows
mount -t cifs -o user=your-windows-username //10.10.10.10/Share /mnt/windows

Requires smbfs/cifs. From here on, it's just normal cp or rsync or whatever you want to do.

Related Topic