tumic
6
As already said, You have to bee root before executing the command.
To do so, You either must enable the root account (http://support.apple.com/kb/ht1528) and use su to became root, or (if you are a user with administration rights) you can use sudo to run just the one command:
sudo lsof -p `cat /var/run/avast/proxy.pid`