macos

How to use the Linux ‘scp’ command without a password to make remote backups alvin January 25, 2018 - 4:27pm

Summary: How to create a public and private key pair to use ssh and scp without using a password, which lets you automate a remote server backup process.

Over the last two years I've ended up creating a large collection of websites and web applications on a variety of Linux servers that are hosted with different companies like GoDaddy and A2 Hosting. I recently embarked on a mission to automate the backup processes for all these sites, and as a result of this effort, I thought I'd share what I've learned here.

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:

A Java graphics utilities class alvin December 21, 2017 - 1:23pm

As a quick note, here’s a little Java graphics utilities class I started putting together today. Mostly I’m just concerned with monitor/display sizes at the moment, especially when a computer system has multiple displays.

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.

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.