Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Given a set of XML files available on a Windows Share \\server\share contains spaces\direcory\, I need a bash command to download one specific file from that share.

Neither wget nor curl support any smb:// URI, and I'd like to avoid the mount command. Solutions?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

smbclient can be scripted to upload or download files using the -c option. Syntax is similar to ftp.

e.g.

smbclient -I [server IP] "//servername/path with spaces/" -c "get [filename]"

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.