Created
December 12, 2018 18:32
-
-
Save kellthenoise/1ebf52a47bac4ea73de8f3d2052227c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To list open files (process id’s and ports, actually): | |
sudo lsof -i -P | |
To avoid text wrapping, pull the right edge to expand the screen width. | |
The right-most column heading "Name" shows the port (either TCP or UDP). | |
To filter a particular port number: | |
sudo lsof -i -P | grep 8080 | |
The second column, PID, lists the process identifier. Copy a number for use in the kill command: | |
sudo kill 289 | |
.dmg (Disk Image) files can be mounted from the command line: | |
hdiutil attach /path/to/diskimage.dmg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment