Indunil Jayasooriya
2006-Oct-02 06:56 UTC
[Samba] How to copy a file from linux to window pc
Hi, I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux Machine) I want to put this file to a windows pc. What is the command to do it. can I use something like the following. mount -t smbfs Then How to use this ? -- Thank you Indunil Jayasooriya
The simliest way is to do this with smbclient, which is like a simple ftp client, type smbclient --help for command line options. regards odi Am Montag, 2. Oktober 2006 08:56 schrieb Indunil Jayasooriya:> Hi, > > I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux Machine) > > I want to put this file to a windows pc. > > What is the command to do it. > > can I use something like the following. > > mount -t smbfs > > Then How to use this ? > > -- > Thank you > Indunil Jayasooriya
Gerard Seibert
2006-Oct-02 10:56 UTC
[Samba] Re: How to copy a file from linux to window pc
"Indunil Jayasooriya" <indunil75@gmail.com>> Hi, > > I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux Machine) > > I want to put this file to a windows pc. > > What is the command to do it. > > can I use something like the following. > > mount -t smbfs > > Then How to use this ?I use this method on my FreeBSD 6.1 system. 1) Create a directory: '/c' 2) Create an alias: alias c:='mount /c' 3) Place this in my /etc/fstab file: //user-name@bios-name/directory /c smbfs rw,noauto 0 0 Obviously you will need to make sure that the drive or directory you want to access are configured correctly on the Windows machine. Now all I have to do is type: c: at the command line and the Win share is mounted. I can then do a simple cp <file> <Win-file>. Ciao! -- Gerard Terrorist memo: Bush is listening. Use big words.
Indunil Jayasooriya wrote:> Hi, > > I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux > Machine) > > I want to put this file to a windows pc. > > What is the command to do it. > > can I use something like the following. > > mount -t smbfs > > Then How to use this ? >There are two basic options: either you can share a folder in Windows and copy the file from the Linux machine, or you can share your /opt/mailbackup folder in Linux and copy the file from the Windows machine. I don't recommend the first option because of security issues with Windows. To do the second, you need to be running Samba on your Linux box. First create an entry in /etc/samba/smb.conf (do this as root) for the folder you want to share. Then restart the smbd and nmbd daemons. On the Windows machine, mount the share then copy the file to where you want it. Another option is to e-mail the file as an attachment to the Windows user.