Can you pipe ... wth?

Howard Owen hbo at
Thu Jun 6 17:33:02 EDT 2002

--On Thursday, June 06, 2002 02:14:14 PM -0700 "Paul M. Lambert" 
<plambert at> wrote:

> sudo find /usr/local -type f -exec ls -ld {} \; | sudo awk '{sum+=$5} END
> {print sum}'

Why do you need the second sudo? Awk doesn't need privilege in the example

Howard Owen                      "Even if you are on the right
EGBOK Consultants                 track, you'll get run over if you
hbo at    +1-650-339-5733  just sit there." - Will Rogers

More information about the sudo-users mailing list