Mac Tips and Tricks

Here are some tips I personally use for productivity on a Mac. Many of them are commands you will type in a terminal window. If you don’t know what that is, move on. I am not responsible for anything stupid you do in your terminal window.

MacOS Tahoe 26.2 and Later

Some of this stuff below has been around for a while, but I’m specifying Tahoe here because that is my current OS. There is no life guard on duty here, dive in at your own risk. Do a back up first though.

Keeping the machine awake for a lengthy Time Machine back up

It can be frustrating when you haven’t backed up for awhile or you have a new machine and you start a backup and then go away for several hours only to come back, wake the machine up and see the Time Machine back up is only 10% done. Even though the machine is plugged in with a power cable and you’ve set all the settings to keep it awake, it still couldn’t finish. This is one of my many frustrations with Apple. I shouldn’t have to download a 3rd party app to keep the damn machine awake long enough to finish a backup. Well, thanks to the “caffeinate” command, you have a built-in solution a lot of folks don’t know about.

Open a terminal window and type “man caffeinate” to get all of your options for this command.

This approach works for me, I use it when I do a Time Machine back up to ensure it will finish. Just remember to come back and “Ctrl-C” out of the command in the terminal window so your system can sleep and save energy.

This command will keep your Mac awake as long as it’s terminal window is open:

caffeinate -dimsu


Now open a second terminal window (“⌘ command + N”) and type this if you want to see if it worked:

pmset -g assertions

Look for UserIsActive and PreventUserIdleSystemSleep. If they show a value of 1 your are good to go, your system is successfully blocked from sleeping.

Installing something that needs admin privileges in a user account

I run my Macs with only one Admin account. I create Standard user accounts for everyday work. I do everything in the Standard account. This way, if I somehow get a virus (rare, but does happen on Macs), the rogue software does not have Admin privileges and therefore cannot run wild on the machine.

However, sometimes you need to install some command line software like Homebrew or MacPorts. A lot of software for developers and techies cannot simply be downloaded from the app store.

If you start an install in your Standard user account you might see some errors about requiring admin privileges or something of that sort.

If you are a unix or linux old timer you might try “sudo myusername” only to get the dreaded, confusing and at first startling response: myusername is not in the sudoers file.  This incident will be reported.”

Assuming you understand exactly what that means, adding “myusername” to the sudoers file is really not a great idea on a Mac because it could create a security vulnerability which completely undermines the concept of running day-to-day as non-admin user.

Instead, do this, it will prompt for the Admin password and you’ll be running as Admin in the terminal session:

su adminUserName

You’re welcome.

Where the hell did I save that last version of my song?

There is a search bar in the Finder but I’ve never been a fan of that thing. It’s just too slow and shows me too many results without filtering. Once again, head to the terminal window.

find . -name "MySong*"

Obviously it will be faster if you start this in a directory that’s not your home root, such as /Users/charles. Starting in /Users/charles/Music for example should be much faster.

Looking specifically for a Logic project, try this:

find . -name "MySong*.logic*"

Not sure if it’s upper, lower or mixed case?:

find . -iname "mysong*.logic*"

The asterisks are wild cards but I would be amazed if you are reading this and didn’t know that already.

Remove a non-empty directory

Sometimes you need to remove remnants of a Logic plugin or some other file or group of files. For example, deleting the plugin maker’s software in your Application folder is not enough. Google it first, but you’ll most likely need to dig through your ~/Library folder and not all of the files are gonna be there depending on your Finder settings for displaying hidden files. These are the ones that start with a “.”

So as you dig in a terminal window for these files (doing a Time Machine backup first is highly recommended before you type anything into a terminal window), you might find a file that’s actually a directory. You “cd” into that directory to find a whole bunch of other directories. Here’s how to remove a directory and everything in it.

rm -r directory-name

That will delete all the files in the directory and remove the directory. There are other command line options you can use to tell it to prompt you before deleting each file, etc. Type this to see them:

man rm

What shell am I running?

For us old timer Unix/Linux guys it can be confusing when you see that Apple has their own default command-line shell call Zsh (Z shell). I’ll let you Google how to force it to use Bash. But if you want to know what the current shell is:

echo $SHELL

Where the hell is that app?

I almost never open the Applications folder on my Mac to start an app. I either keep it in the dock for quick access or I type “⌘ command + space bar” and then type the name of the app.