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


You can create a tar archive:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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