I'm trying to show the number of lines, words and characters of all configuration files in /etc/*conf (with command wc).

How can I modify the command (or commandline) to not view the error messages?

link|improve this question
1  
If Roy's answer below doesn't provide what you want, could you provide the command you're trying so we can get an idea of what's not working properly? – Matrix Mole Mar 25 '10 at 22:46
feedback

2 Answers

up vote 3 down vote accepted
wc /etc/*conf 2>/dev/null
link|improve this answer
feedback

i don't have access to a shell right now, but you can try something like

cat /etc/*.conf 2> /dev/null | wc -l

That should redirect all the errors and leave the output to be passed to wc

link|improve this answer
this won't allow wc to output word/line/char counts per-file, if that's what the OP wants. it will get the total of all /etc/*conf files. – quack quixote Mar 25 '10 at 23:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.