Monitoring disk I/O on MacOS X with iosnoop, fs_usage and iotop

MacOS X comes with great command line programs for debugging and troubleshooting various issues with your system. If you ever need to check what program is accessing your disk, use these three programs: iosnoop, fs_usage and iotop.

All require the sudo password, as they tap deep into your kernel to get the information.

Continue reading

Capturing the screen in MacOS X

MacOS X comes with a built-in ability for capturing screenshots. The two most popular ones are:

Command ⌘ + Shift + 3 for capturing the whole screen and Command ⌘ + Shift + 4 for capturing a portion of the screen. The latter one changes your mouse pointer into a cross-hair, allowing you to select an area. Both shortcuts place the result onto a PNG file on your desktop.

How about capturing only the active application window? There is a trick for that too.

Press Command ⌘ + Shift + 4, then press Space, and the mouse pointer will change to a camera icon and highlight the active window under it. Click to make the capture.

Downloading files from the Internet using the command line on Mac OS X

The first time you try to download a file using the Terminal on Mac OS X, you’ll find out that there is no ‘wget’ or ‘fetch’ installed into the base system. Inquiring minds can find a solution after bashing their Tab key for a few near-random auto-complete guesses, but I’ll save you from that humiliating experience 🙂 Please welcome the ‘ftp’ tool. A fast visit to the man page for it will result in knowing that it’s not limited to the FTP only, and you can use it to download files over HTTP as well.

Continue reading