How to list all files in a Windows SMB network share

5

Given a single SMB network share (for example, \\server\\SHARED_FOLDER), I want to recursively list all the files, including those in the subdirectories (like find(1)).

I would prefer to do it in Linux, but I also accept Windows answers.

Danilo Piazzalunga

Posted 2011-05-31T08:44:31.450

Reputation: 281

1.. assuming without mounting it? – slhck – 2011-05-31T08:47:02.710

Answers

2

I would use:

sudo smbmount //server/SHARED_FOLDER /local/folder
cd /local/folder
ls -R

Obviously, add your preferred ls flags into the command (so, for me, I would use ls -lahR, but that's a personal preference).

Lukasa

Posted 2011-05-31T08:44:31.450

Reputation: 1 995

4

Try the command: smbclient //HOST/PATH -c 'recurse;ls' PASS -U USER

Yezzo

Posted 2011-05-31T08:44:31.450

Reputation: 41