[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash, find and error message question



Reco wrote:
> songbird wrote:
...
>>   i don't care if it is returned, i just wonder why it isn't
>> redirected to /dev/null like i'm asking it to do.
>
> Because you're redirecting stderr of a wrong process.
> This one-liner should do it.
>
> find . -type f -exec printf %.0s. {} + 2>/dev/null | wc -m

  i don't know why, but for some reason i thought the
stderr would be passed through the entire series of
piped commands.  i've hit this before and it never 
clicked.  haha...

  i don't really do a lot of complicated things with find
very often and when i have i haven't had errors (my file 
systems are more predictable than fuser is and i don't do 
things via remote connections or external devices hardly 
ever).

  thanks!  :)  cheers.  off to take break...


  songbird


Reply to: