1

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
1

1 Answer 1

3

@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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .