I need to count the number of lines in files from a set. I tried to execute
find -name pattern -exec vc -l '{}' \;
But this command returns
find: `vc': No such file or directory
@Gilles is right, the command is called wc
. The following does the job:
find -name pattern -exec wc -l '{}' \;
An alternative without using find
might also do the job:
wc -l pattern
wc
. Also, change\;
to+
if you want to get the total count as well.