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 e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors