How to show the largest files under a directory on Mac OS X (Unix) alvin December 23, 2017 - 1:00pm

Here’s an example that shows how to find the largest files under a directory on MacOS and Linux/Unix systems.

A du/sort command to show the largest files under a directory on Mac OS X

The Unix/Linux command that worked for me on my MacOS system is this:

$ du -a * | sort -r -n | head -10

du is the disk usage command, and the -a flag says, “Display an entry for each file in a file hierarchy.” Then I use the sort command to sort the du output numerically and in reverse. After that, head -10 shows only the first ten lines of output. In the Music folder on my Mac the command and output look like this:

How to change the Mac Terminal title from the command line

Mac Terminal FAQ: How can I change the title on the Mac Terminal app from the Mac/Unix command line?

I've been working on a project where I have three Mac Terminal tabs open at one time, and I found it was much easier to work this way when I changed the title on each Terminal window. This helped me easily identify what I was doing in each Terminal window.

Changing the Mac Terminal title

The basic escape sequence you need to change the Terminal title from the command line is this:

How to make a backup copy (ISO) of a CD or DVD using the MacOS dd command

Table of Contents1 - Step 1: Insert a CD or DVD2 - Step 2: Find the CD/DVD identifier3 - Step 3: Unmount the drive4 - Step 4: Copy the DVD with the dd command5 - Step 5: Eject your media

If you want to make a backup copy (an ISO image) of a CD or DVD on a MacOS system using the dd command at the Mac Terminal command line, I’ll demonstrate the process in this tutorial.

Back to top

Step 1: Insert a CD or DVD

Assuming that you’re using an external CD/DVD drive, the first step is to connect your drive to your computer, and then insert a CD or DVD. If you insert a movie or music CD and an application automatically starts playing, quit that application.

Jonathan Ive focused on design, again

As I’ve written about before, I assumed that Apple’s Jonathan Ive had his hands full with the completion of the design of Apple Park, and that was affecting the design and quality of Apple’s recent product offerings. This quote comes from “With the completion of Apple Park, Apple’s design leaders and teams are again reporting directly to Jony Ive, who remains focused purely on design,” Amy Bessette, a company spokeswoman, said Friday in a statement.

Walmart deploying Mac computers to save money

Multiple sources, including, are reporting that Walmart plans to deploy 100,000 Mac computers to save on employee PC costs. From that article: “IBM noted that PC users drive twice the number of support calls compared to Mac users, and that PC support tickets require desk side support by IT personnel five times as often. The company's own analysis showed that each Mac deployed saves the company $270 in support costs compared to a Windows PC.”

MacOS screen annotation/presentation software

I was going to write a little application to let me annotate my MacOS screen during presentations, but the Ink2Go product looks like it does exactly what I was thinking. As I’m creating a video presentation, such as when showing how to write some Scala or Android code, I want to be able to draw on the screen, such as writing text, arrows, circles, and boxes to highlight parts of the screen. Ink2Go looks like what I want.

A Mac/Java javapackager example (getting the application bundle root directory) alvin August 18, 2017 - 7:39pm

I wrote earlier about how to use the javapackager command to create a macOS application bundle from a Java application, so I won’t repeat all of that information here. Instead, in this article I just want to show how to display an image that’s stored in the Contents/Resources/Java directory of a Mac/Java application bundle.