Samba to copy files from linux to Windows

From Wickle Wiki

This howto explain howto copy files from linux to windows without a graphical interface.

First of all, you must have installed samba (smbclient is the program we will need)


To view the shares of a machine named joel:

vic@coffdeb:vic$ smbclient -L joel -Ujoel '\\tmp\' -c
Password: *******
Domain=[DOMCOMASIS] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename       Type      Comment
        ---------       ----      -------
        Jn              Disk      PaCKs
        IPC$            IPC       IPC remota
        D$              Disk      Recurso predeterminado
        tmp             Disk
        ADMIN$          Disk      Admin remota
        C$              Disk      Recurso predeterminado
Domain=[DOMCOMASIS] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------

And , to copy files , enter interact mode :

vic@coffvic@coffdeb:vic$  smbclient //joel/tmp -Ujoel
Password:
Domain=[DOMCOMASIS] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: \> ls
  .                                   D        0  Tue May 10 12:19:48 2005
  ..                                  D        0  Tue May 10 12:19:48 2005
  1_Intro.mpg                         A 19449860  Thu Apr 14 10:23:22 2005
  2_primera_fase.mpg                  A 41021444  Thu Apr 14 11:02:24 2005
  3_otra_fase.mpg                     A 10795012  Thu Apr 14 11:24:13 2005
  4_batalla_multiplayer.mpg           A 26982404  Thu Apr 14 11:14:11 2005
  BeerForMyHorses.wmv                 A 29886922  Tue May 10 12:20:00 2005
  master_programacion_java.JPG        A   127922  Wed Apr 13 19:21:13 2005
  meis.png                            A   391415  Tue May  3 19:27:00 2005
  mp3                                 D        0  Tue May 10 10:24:18 2005
  Nueva carpeta                       D        0  Wed May  4 12:34:30 2005
  Thumbs.db                         AHS    19456  Wed May  4 12:35:44 2005
  UDPChat                             D        0  Mon Dec 20 21:11:37 2004
  vncviewer                           D        0  Thu Apr 28 10:56:47 2005

                46312 blocks of size 1048576. 40060 blocks available
smb: \> lcd videos (change directory on my local drive)
smb: \> !ls (show files on my local disk)
BeerForMyHorses.wmv  pvpmage.wmv  srwhill.wmv
smb: \> put BeerForMyHorses.wmv (copy file from local to remote)
putting file BeerForMyHorses.wmv as \BeerForMyHorses.wmv (2421.5 kb/s) (average 2421.5 kb/s)
smb: \> exit

Thats all folks ...

Personal tools
This site is powered by Queres Tecnologias