Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
.. assuming without mounting it? – slhck May 31 '11 at 8:47
up vote 2 down vote accepted

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).

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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