SMBclient put file does not exist

1

I am trying to write a cron script which will copy a file from an SMB share to my local linux folder.

I am connecting to the share like this...

/usr/bin/smbclient \\\\myserver\\myshare

It connects correctly and if I issue dir I can see the file I want myfile.txt

I am then trying to copy it like this...

put myfile.txt /home/myuser

This gives me an error like this...

myfile.txt does not exist

Anyone any ideas?

fightstarr20

Posted 2016-05-25T12:55:23.150

Reputation: 113

Answers

1

put copies files to the server. If you want to get files from the share, use get.

user1686

Posted 2016-05-25T12:55:23.150

Reputation: 283 655

Obviously, can't believe I missed that! – fightstarr20 – 2016-05-25T13:20:46.237