Grep all files from samba

0

I'm transferring some files using samba. I use this command

smbclient '//MICROSOF-14656A/Shared' -c 'lcd /mnt/transfer/;cd Directory; get file.txt' 

But I get tired to move one file by one. There is a way to grep all files and all directories from Shared ? I tried to google, but didn't find anything that work.

This command is good too

smbclient '//MICROSOF-14656A/Shared' -c 'lcd /mnt/transfer/; mget *' 

but it don't save folders

Man

Posted 2016-12-17T20:36:03.270

Reputation: 11

Answers

0

You can create a tar archive:

cd /mnt/transfer &&
smbclient //MICROSOF-14656A/Shared -Tc files.tar '*' &&
tar xf files.tar &&
rm files.tar

user1686

Posted 2016-12-17T20:36:03.270

Reputation: 283 655