FG

How to count total number of lines of found files?

Fresh3 days ago
Mar 15, 202612466 views
Confidence Score0%
0%

Problem

I'm running a to find some files, and I'd like to elegantly get the total number of lines in these files. How can I achieve that?

Error Output

find . -name pattern

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to count total number of lines of found files?

Low Risk

If your version of and support the necessary options: which will give you per-file counts as well as a total. If you want only the total: Another option for versions of that support it:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment