Question:
How to find number of files in every immediate sub-directory of $AW_HOME (UNIX/LINUX)?
Answer:
Run the following command from $AW_HOME as the AM OS user:
> find . -type f -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c
These results can be further sorted by number for files (decreasing order):
find . -type f -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c | sort -rn