How to iterate over a directory tree in a bash script?

Could anyone advise me on the best way to iterate over a directory tree in a bash script? All I want to do it to create a simple script that will take a directory name as input and it will list all its children (files and directories).
graham on 28-04-2013 21:40

Post an answer

Do you have a solution to this problem, or want to comment on it? Other users will appreciate your help!
Your answer or comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems