comando bash para encontrar el número de archivos en un directorio
ls -1q | wc -l
Yucky Yak
ls -1q | wc -l
find . -type d -print0 | while read -d '' -r dir; do
files=("$dir"/*)
printf "%5d files in directory %s\n" "${#files[@]}" "$dir"
done
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
find -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; done
#Find all File's name that starts with chapter-CHAPTER in a Directory
count=$(echo $PATH |ls | grep '^moby-CHAPTER' | wc -l)
echo $count chapters