Sum the number of lines in each file of a folder

Run this command to sum the number of lines in each file of a folder

find . -maxdepth 1 -type f -exec wc -l {} + | awk '{sum+=$1} END {print sum}'

Laissez un commentaire

Votre adresse de messagerie ne sera pas publiée.

Search
Generic filters
Exact matches only
Filter by Custom Post Type