Help with /dev/null Please

Hello All and a Happy New year to yous guys.

I'm running the below command on my AIX box and it keeps giving me the message that the file doesn't exist. I know the file don't exist, but I don't want to see the error. 2>/dev/null doesn't work.

bash-3.00$ ls -l C* | wc -l 2>/dev/null
ls: 0653-341 The file C* does not exist.
0

How can I support the "...file C* does not exist." please?

ls -l C* 2>/dev/null | wc -l 

Yup! That works.

Thanks a mil and All the best to you in 2013.

1 Like