Answer by Liso for Count number of files with specific extension(s) for each...
Here's from mine, modified from this answer.find . -maxdepth 100 -type d -print0 | while read -d '' -r dir; do count=$(find "$dir" -maxdepth 1 -type f \( -name '*.jpg' -o -name '*.png' \) -ls | wc -l);...
View ArticleAnswer by mashuptwice for Count number of files with specific extension(s)...
Find has logical operators like AND, NOT and OR.To specify more than one extension to search for you need to put the arguments in parentheses, as well as escape the parentheses to avoid them being...
View ArticleAnswer by pa4080 for Count number of files with specific extension(s) for...
Probably this find|xargs solution will work as you need.find . -mindepth 1 -maxdepth 99 -type d -print0 | \xargs -0 -i bash -c 'printf "%10d\t%s\n" "$(find "$1" -maxdepth 1 -type f -regextype awk...
View ArticleCount number of files with specific extension(s) for each subdirectory
Source: Any directory tree with any number and type of files. Q: How many .jpg or .jpg and .png (for example) are in each subdirectory?How can I limit the code below for files with 1 or more specific...
View Article
More Pages to Explore .....