DEV Community

Discussion on: The linux commands that help me work

Collapse
 
tomfern profile image
Tomas Fernandez
grep 'Search string' access.log | wc -l
Enter fullscreen mode Exit fullscreen mode

is the same as (cat is not needed here):

cat access.log|grep 'Search string' | wc -l
Enter fullscreen mode Exit fullscreen mode

Also I prefer not using -v in tar. It shows a lot of noise and I may miss some important error.

Thanks for sharing your commands. 😀

Collapse
 
polmonroig profile image
Pol Monroig Company

In fact you can even remove the wc command with the -c flag of grep 😉

Collapse
 
tomfern profile image
Tomas Fernandez

You're right! I'm always forgetting it can count.