Identifying which processes are using network ports on a Mac
Feb 9th
Typically I’d use netstat’s -o flag to identify the process ID when listing networking activity from a Linux/Unix machine. Unfortunately this option is not available with netstat on Mac OS X.
I recently has a rogue process (I suspected a virus) on my Mac that was creating thousands of connections out to hosting providers. Luckily I [...]
Count the processors on a Linux server
Jun 2nd
If you need to see how many processors there are available on a Linu/Unix server, use the following command from your shell:
cat /proc/cpuinfo | grep processor
each of the processors will be listed in the output. For example, on a server I use the output looks like this:
processor : 0
processor [...]
Deleting all files over a certain age on a Linux server
May 4th
To delete files on a Linux server that are all over 3 days old, use this:
find /log/ -type f -mtime -3 -exec rm {} \;
This command will find all files in /log over 3 days old and will run the rm command for each of them.
