'ls dir1/*<em>/</em>.ext' just lists all the files with just one level of nesting. What is the command to recursively list all the files with any level of nesting in linux?Answer1:
ls -R dir1
find dir1 -name "*.ext"Answer2:
find command is one way to do this:
find dir1 -name .ext
-name operator <em>can</em> take a wildcard to match with, but it's important to quote the wildcard expression so that it won't be expanded by your shell before calling into
find dir1 -name "*.ext"
find command has many operators that can do various different tests on the files in the directory, of which
-name is just one example. Consult <a href="http://linux.die.net/man/1/find" rel="nofollow">the
find manual page</a> for more information.
To list folder recursively:
You could use
That command would list everything under the current folder