Im in the process of redeveloping an existing site. Its a small site that whilst i develop i am running on rails built in server using port 3003. This means i can work on it on the server its destined to be applied without affecting the original site, (This will make it a breeze to switch from the current site to the new site). The problem is i keep starting the server, but forgetting to shut it down properly so when i goto start the server, the server is not running properly but the port is still being used.
To find the process ID of a process running on a particular port you can use:
/usr/sbin/lsof -i tcp:3003 -Fp|tr -d p
This will give you the process ID which you can then pass to kill to stop it completely.

8 bit scraps has been created by Graham Hadgraft a web developer from Ipswich. Graham Hadgraft has 10 Years programming experience in various languages.