Score:0

smbclient how get specific files

ru flag

I have Synology NAS with embedded Linux and can use only predifined utilities.

When im try copy remote files through:

smbclient connect to remote

smb: \> prompt
smb: \> mask *file*.rar
smb: \> mput *

Copy is OK

but how i can do this?

smbclient connect to remote

smb: \> prompt
smb: \> mask "date ‘+%Y_%m_%d’*.rar" > I get error 
smb: \> mput *

I try use alias too, it don't work for me

Hope on your answers

Nikita Kipriyanov avatar
za flag
smbclient doesn't know what to do with backticks. It's unix shell feature, not smbclient feature. If you are going to use it in a script, you can craft the filename with embedded date (or whatever) in a shell and feed smbclient with already built command, and there you can use backticks. See for inspiration: https://stackoverflow.com/questions/28698694/smb-client-commands-through-shell-script
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.