Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On Linux, how would I recursively traverse a variable number of shares?

share|improve this question

migrated from stackoverflow.com Jul 22 '09 at 15:39

This question came from our site for professional and enthusiast programmers.

3  
What language. is "find . -type d" is a good start for shell scripting. –  slacy Jul 22 '09 at 3:59
    
Are shares mounted? If not you can use smbclient. –  Eugene Jul 22 '09 at 4:33
    
You need to add more detail to the question so it actually means something :). We can guess what you mean and give you nik's answer but we don't actually know what you want yet. –  James Jul 22 '09 at 15:43

1 Answer 1

I just answered your other question.
The generic directory traversal from a point above the shares would be,

find . -type d -exec ls -ld {} \;

This will enumerate all the directories under your base directory.

You could however, run this individually over a list of the shared directories to get separated results.

share|improve this answer

Your Answer

 
discard

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