Skip to main content

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to isntallinstall FTP on the Windows machine.

Here follows some examples:

Transfer file from local (unix/linux) to Windows:

smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "put file-local.xml folder1\folder2\file.xml"

Transfer file from Windows to Linux:

There are two options, onethe first is using the command get'get' with smbclient and a the othersecond, a shortest to useone: smbget:

1. smbclient: `smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "get folder1\folder2\file.xml file-local.xml"`
2. smbget: `smbget -u <my-user> -p <password> -w domain.org -o destination-file.txt smb://server.domain.org/d$/folder1/folder2/source-file.txt`

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to isntall FTP on the Windows machine.

Here follows some examples:

Transfer file from local (unix/linux) to Windows:

smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "put file-local.xml folder1\folder2\file.xml"

Transfer file from Windows to Linux:

There are two options, one using the command get with smbclient and the other shortest to use smbget:

1. smbclient: `smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "get folder1\folder2\file.xml file-local.xml"`
2. smbget: `smbget -u <my-user> -p <password> -w domain.org -o destination-file.txt smb://server.domain.org/d$/folder1/folder2/source-file.txt`

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to install FTP on the Windows machine.

Here follows some examples:

Transfer file from local (unix/linux) to Windows:

smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "put file-local.xml folder1\folder2\file.xml"

Transfer file from Windows to Linux:

There are two options, the first is using the command 'get' with smbclient and a the second, a shortest one: smbget:

1. smbclient: `smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "get folder1\folder2\file.xml file-local.xml"`
2. smbget: `smbget -u <my-user> -p <password> -w domain.org -o destination-file.txt smb://server.domain.org/d$/folder1/folder2/source-file.txt`

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to isntall FTP on the Windows machine.

Here follows some examples:

Transfer file from local (unix/linux) to Windows:

smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "put file-local.xml folder1\folder2\file.xml"

Transfer file from Windows to Linux:

There are two options, one using the command get with smbclient and the other shortest to use smbget:

1. smbclient: `smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "get folder1\folder2\file.xml file-local.xml"`
2. smbget: `smbget -u <my-user> -p <password> -w domain.org -o destination-file.txt smb://server.domain.org/d$/folder1/folder2/source-file.txt`

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to isntall FTP on the Windows machine.

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to isntall FTP on the Windows machine.

Here follows some examples:

Transfer file from local (unix/linux) to Windows:

smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "put file-local.xml folder1\folder2\file.xml"

Transfer file from Windows to Linux:

There are two options, one using the command get with smbclient and the other shortest to use smbget:

1. smbclient: `smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "get folder1\folder2\file.xml file-local.xml"`
2. smbget: `smbget -u <my-user> -p <password> -w domain.org -o destination-file.txt smb://server.domain.org/d$/folder1/folder2/source-file.txt`
Source Link
John
  • 17.4k
  • 2
  • 36
  • 44

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to isntall FTP on the Windows machine.