Command Line

Just spent some time learning some terminal magic for filtering through log files looking for specific data.  Check out what I found!

Terminal commands for blocking incoming connections from an IP as well as viewing all currently blocked IP's

Run the following command in the terminal and then restart your Finder app.
defaults write AppleShowAllFiles 1

Recently I noticed that on my server the host process (/usr/bin/host) was chewing up TONS of CPU (90-100% on one core and 10-20% on the other according to top).  After doing some research I found the following article on host process being used in an HTTP DDOS attack.

Using the dmidecode command you can find out many details about the hardware in your computer system.  Some of the information you can find is Motherboard make and model, CPU make and model, Video card make and model.  It seems that almost anything plugged into your computer will show up here.
Motherboard information is listed under the term: Base board
You need to either be root or use sudo to run the command below.

sudo dmidecode

Command line find/replace on files:

perl -p -i -e 's/old/new/g' `ack -l --html searchpattern`

sudo apt-get install ack-grep
For reference:

To jump to the beginning or end of a file (useful if it is really long as in an export of a SQL database) use the below shortcuts:

Beginning of file

ALT + \

End of file

ALT + /


In order to install an SSL certificate you need a couple of things.

To find the size of a specific directory use the following command.  If using / (root directory) you may need to run this using sudo.
du -chs /path/to/directory
-c - produces grand total
-h - human readable sizes (e.g. 1K, 25M, 3G)
-s - summarize (produces a total for each argument)
man du
for extra options