|
187.
|
|
|
Another way to copy files from a Windows server is to use the <application>smbclient</application> utility. To list the files in a Windows share:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../docs/sharing/C/sharing.xml:1199(para)
|
|
188.
|
|
|
smbclient //fs01.example.com/share -k -c "ls"
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1281(command)
|
|
189.
|
|
|
To copy a file from the share, enter:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1287(para)
|
|
190.
|
|
|
smbclient //fs01.example.com/share -k -c "get file.txt"
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1292(command)
|
|
191.
|
|
|
This will copy the <filename>file.txt</filename> into the current directory.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1295(para)
|
|
192.
|
|
|
And to copy a file to the share:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1302(para)
|
|
193.
|
|
|
smbclient //fs01.example.com/share -k -c "put /etc/hosts hosts"
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1307(command)
|
|
194.
|
|
|
This will copy the <filename>/etc/hosts</filename> to <filename>//fs01.example.com/share/hosts</filename>.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1311(para)
|
|
195.
|
|
|
The <emphasis>-c</emphasis> option used above allows execution of the <application>smbclient</application> command all at once. This is useful for scripting and minor file operations. To enter the <emphasis>smb: \></emphasis> prompt, an FTP-like prompt where normal file and directory commands can be executed, simply run the following in Konsole:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../docs/sharing/C/sharing.xml:1242(para)
|
|
196.
|
|
|
smbclient //fs01.example.com/share -k
|
|
|
|
(no translation yet)
|
|
|
|
Located in
docs/sharing/C/sharing.xml:1329(command)
|