Reputation: 3376
When I use wc *
it shows warning for the directories.
Is it possible to filter the current directory and get only the list of files and pass it to the wc
.
Upvotes: 1
Views: 48
Reputation: 784908
You can use find
:
find . -maxdepth 1 -type f -print0 | xargs -0 wc -l
Or with gnu wc
:
find . -maxdepth 1 -type f -print0 | wc --files0-from=- -l
Upvotes: 1