List of active ports in MacOsX

margusja@IRack:~$ sudo lsof -i -n -P | grep TCP