Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 of 6 added 481 characters in body
ls */

This would list the contents of all the non-hidden subdirectories in the current directory. Since you only seem to have subdirectories with numeric names, this will show the contents of these.

The shell globbing pattern * would expand to all non-hidden names in the current directory. Adding a / at the end of the pattern forces the pattern to expand to only directories (since non-directories can't have / in their names).

With the zsh shell, the following filename globbing pattern would expand to only regular files in each subdirectory

*/*(.)

To do something with those names that matches, you would loop over the expansion of that glob pattern:

for pathname in */*(.); do
    # use "$pathname" here
done

In bash or sh, you would call a small script from find instead:

find . -mindepth 2 -maxdepth 2 -type f -exec sh '
    for pathname do
        # use "$pathname" here
    done' sh {} +

But that's really just a fancy way of writing

for pathname in */*; do
    [ ! -f "$pathname" ] && continue
    # use "$pathname" here
done

except that the find variation would skip symbolic links to regular files.