Guys, if you ever wanted to find out the exact specific port number used by a process/application on Unix/Mac OSX/Linux, type the following in Terminal :
The output would be something like :
This will show only the specific Command and Port columns from the top command and will skip other details like Process ID, % CPU utilisation , Memory usage etc.
Alternatively if you wanted to just find the port number used by a specific application, say for e.g. TextEdit, you could use the following command :
Cheers guys!
top | awk '{print $2, $7}'
The output would be something like :
COMMAND #PORTS
awk 12
top 22+
top 19
Alternatively if you wanted to just find the port number used by a specific application, say for e.g. TextEdit, you could use the following command :
top | awk '{print $2, $7}' | grep TextEdit
TextEdit 140+
TextEdit 140
TextEdit 140
Cheers guys!
No comments:
Post a Comment