Monday, 31 December 2018

Count files in a directory on a basic Linux system

find . -maxdepth 1 -type d -print0 | xargs -0 -I {} sh -c 'echo -e $(find {} | wc -l) {}' | sort -n

No comments:

Post a comment