Consider yourself a Mac power-user? Or do you aspire to take your place amongst such privileged ranks? Here’s a selection of classic yet simple tricks taken fromMac Kung Fu: Second Edition to help you on your way.
Mac Kung Fu: Second Edition is a book previously sold for $25+ but now reduced to the bargain price of £1.49/$1.99 (buy it here). That’s 400+ tips, 120,000+ words, and over 700 eBook pages for less than a cappuccino – and it’s written by regular Macworld contributor and Apple expert Keir Thomas, to boot. What more could you want?
Just for you we have a collection of tips from the book! Read on…
You might find our Best Mac tips, tricks and timesavers interesting too.
Instantly Add Movies and Music to iTunes
If you use third-party software to download or rip music and movies to your computer, you’ll be familiar with the rather lengthy process needed to add them to your iTunes library – you have to start iTunes, then ensure the correct music or movie list is visible, and finally drag and drop the files onto the program window….
However, there’s a hidden folder you can use to import music and movies straight into iTunes. All you need to do is configure any app you use to download files straight into this folder, and they will be instantly imported – even if iTunes isn’t running at the time.
To find the folder, open Finder, hit Shift+Command+G, and then type ~/Music/iTunes/iTunes Media/. One of the folders you should see will be Automatically Add to iTunes. As its name suggests, any files copied into this folder will be added to iTunes automatically. Assuming you have kept the default preferences setting of iTunes organizing your media folders, any files placed there will be moved out of the folder and automatically filed within the Music folder whenever iTunes is running, so it should appear empty most of the time.
You can create a desktop alias of the folder by clicking and dragging it to the desktop, before pressing Alt (Option)+Command and releasing the mouse button. You can then simply drag and drop files onto the alias instead.
Add Magical Links to Start iMessage conversations, and More
You might be used to inserting web hyperlinks into documents or when composing emails (click Edit > Add Link and type the address). Whenever anybody clicks the link, they’ll visit the site you specified, just like in a web page.
In addition to links to websites, MacOS lets you create app-specific links. For example, you could include a link in a mail message that, when clicked, will start within the Messages app an instant messaging conversation with somebody. You could create a link in a document that, when clicked, looked up a particular word in the Dictionary app.
To create a link in a TextEdit document or new mail window, highlight the text you want to turn into the link, and click Edit > Add Link, or hit Command+K.
Then look to the following list for what to type into the Create Link dialog box.
http://—You can insert links to web pages by simply typing the address, including the http:// component. For example, typingwill create a link to that site.
imessage://—This will start a Messages conversation within the Messages app. For example, typing imessage://07912345678 will open Messages and attempt to start an iMessage conversation with that phone number – or send an SMS if you have Handoff enabled. You can also specify IM handles: if you have a Yahoo buddy whose handle is johnsmith, you could create the following link: imessage://johnsmith. This assumes you’ve configured Messages to log onto your Yahoo account, of course.
facetime://—This will start a FaceTime conversation within the FaceTime app. For example, facetime://keir@will attempt to start a FaceTime conversation with the individual whose FaceTime account is registered to that address. Apple IDs and phone numbers can also be specified, although as with iMessage, the phone number should be typed without any spaces or symbols in it.
dict://—This will cause the Dictionary app to start and look up a particular word. For example, dict://epicurean will open Dictionary with the word definition for Epicurean displayed, as if it had been typed into the search field.
vnc://—This will open a screen-sharing session with whatever address is specified, although the user will still have to click the Connect button in a dialog box that appears when the Screen Sharing software starts. vnc://macbook will attempt to start a screen-sharing session with the computer whose network name is macbook.
x-man-page://—This will open the man page for the specified term within a Terminal window. For example, x-man-page://sharing will open the man page for the sharing command.
When used without any specified address (that is, if you simply type imessage:// or facetime:// in the link dialog box), the apps will be activated when the link is clicked, as if the user has clicked their app icon in the Dock.
It’s also possible to insert other, typical URLs that are used in web pages, such as mailto://, ssh://, and telnet://.
Keep your Mac wide awake
If you need to leave your Mac unattended for a while but want to temporarily stop it going into sleep mode, open a Terminal window (this app is in the Utilities folder the Applications list in Finder), and type the following:
For as long as the Terminal window is open and the command is still running, the computer won’t go to sleep through inactivity, and nor will the display. Technically you’re turning off idle sleep mode, which occurs when OS X detects the user hasn’t done anything for a while.
To end the wakefulness, switch back to the Terminal window and hit Control+C or simply close the Terminal window.
Rather than running caffeinate indefinitely, you can specify a time limit, although this must be specified in seconds. If you wanted your computer not to sleep for two hours, for example, then you’d first need to work out the number of seconds (2 hours x 60 minutes x 60 seconds = 7200 seconds) and then specify it after the -t command-line option, as follows:
caffeinate -dt 7200
Again, you can bring this to a premature end by tapping Control+C or closing the Terminal window.
Save Text Snippets for Quick Reuse
Here’s a neat trick for those who work with words on their Macs.
If you highlight text in an application and click and drag that to a folder or to the desktop, the text is turned into a file. These are called text clippings, and they will take their filename from the first few words of the excerpt. If there’s any formatting applied to the text, it will be saved too. This is an excellent way of filing away anything you’ve had to edit out of a document but want to keep for other purposes.
To view the contents of the clipping, just double-click it or select it and hit Space to bring up Quick Look. Note that you won’t be able to edit the file. However, to reinsert the text into a document, just click and drag the clippings file on top of the program window after positioning the cursor where you’d like it to be inserted.
Once reinserted in this way, the text clippings file won’t be deleted, so you can use the clipping again in other documents as many times as you wish.
How to hide files
There are two ways of making files invisible on your Mac. Neither is bulletproof from a security standpoint, and anybody with know-how would be able to uncover them in seconds. But for quietly hiding a file or two for a short period, they’re worth considering.
Hiding Files via Unix: Your Mac’s operating system, MacOS, is actually a version of Unix at its heart. In Unix, you can make a file invisible by adding a full stop (.) in front of its filename, and this works on Macs too. This means the file won’t show up in Finder windows, in file open dialog boxes, or on the desktop. Those browsing at the command line won’t be able to see it unless they specifically request to view hidden files (that is, ls -a).
For example, typing a filename of .when you’re saving a file will render it invisible. You’ll probably be warned that putting a full stop in front of a filename is reserved for system files, the type of file this technique is typically used to hide, but you can still choose to save the file.
Hiding Files So Mac Apps Can’t See Them: The chflags command can be used to hide files so they don’t show up in graphical user interface (GUI) applications. However, they’ll still be visible if anybody browses files using a Terminal window.
To hide files in this way, open a Terminal window (open Finder, select the Applications list, and then in the list of applications double-click Terminal within the Utilities folder), and use the chflags hidden command, specifying the file or folder name immediately afterward. For example, to hide, type the following: chflags hidden
To unhide the file so it’s visible via GUI software again, use the chflags nohiddencommand:
Viewing Hidden Files: So, if a file is hidden, how can you see it in order to open it again? In expanded file open/save dialog boxes within apps, hitting Shift+Command+. (full stop) will display hidden items in the file listing. Hitting the key combo again will hide them. However, be aware that you’ll suddenly see lots of system files that are hidden in this way. (Steer clear of these—don’t delete or open them.)
The only way to see hidden files in Finder windows is to activate a secret setting that shows them alongside other files. This will cause them to always be visible within Finder windows and on the desktop, although hidden files will have a washed-out appearance to indicate their status. Open a Terminal window, and type the following:
defaults writeAppleShowAllFiles -bool TRUE;killall Finder
Even after making this change, you’ll still have to hit Shift+Command+. within file open/save dialog boxes to see hidden files.
To revert to hidden files being hidden within Finder, type the following:
defaults deleteAppleShowAllFiles;killall Finder
Print in Every Which Way
Did you know you can print just about any file straight from Finder – without hassle? This tip is blindly obvious but little known: selecting one or more files in Finder and then click File > Print on the menu. This will automatically open the file(s) in the default editor (that is, a photo will open in Preview and so on) and automatically print it/them.
But wouldn’t it be useful to be able to print a file instantly, without even having to click File > Print?
As you might expect, your Mac lets you do just that. Open System Preferences (Apple menu > System Preferences) and then click the Printers & Scanners entry. In the list of printers that appears on the left, simply select a printer and drag and drop it to the desktop. This will create a shortcut to the printer, which will probably be an icon-sized photograph of your actual printer.
To instantly print any file, simply drag and drop it on top of this new shortcut. Double-click the new icon to view the print queue.
You can also add to the Finder toolbar a shortcut to your printer(s), which will let you drag and drop files to instantly print them or allow you to click the icon to see the print queue. Start by right-clicking the toolbar in Finder, and selecting Customise Toolbar. Then open System Preferences (Apple menu > System Preferences), click Print & Scan, and then drag and drop any of the printer(s) from the list to the toolbar of any open Finder window. Then click Done to close the customise toolbar dialog box.
See EVERYTHING Your Mac Knows About Somebody
By selecting an individual’s entry within the Contacts app and then clicking Edit > Spotlight, you can instantly find every email you have from them (and to them), every instant message conversation you’ve had with them, every document they’ve created, every web page you’ve visited that mentions them, every file you’ve tagged with their name, and so on (provided relevant details are contained within their card within the Contacts app. You won’t be able to find their instant message conversations if their IM address isn’t on the contact card, for example).
Calm a bouncing dock icon
Some apps bounce their Dock icons when they want to tell you something, such as when a task has completed. Some apps bounce their icons for a short while, while others will keep bouncing the icon until you do something about it. This can be annoying if you’re busy doing something else.
While clicking the Dock icon to activate the app is one solution, another is simply to move your mouse cursor over the icon. It will instantly stop bouncing, and you can then return to the task at hand.
Force-Open a File
You can drag and drop files onto any Dock icon to open them, but only if that application believes it can understand that particular type of file (for example, doc files are understood by Microsoft Word). Unfortunately, some applications don’t realise they can read certain types of files when they actually can.
To force an application in the Dock to at least attempt to open a file it doesn’t believe it can, hold down Alt (Option)+Command before clicking and dragging the file to the Dock. If the application genuinely can’t understand the file, either nothing will happen or you’ll see an error message.
For a higher probability of success when dragging to the Dock icon as described earlier, you might also try removing the file extension from the file before opening it as described (that is, the part after the dot in a filename, such as .jpg). To do so, select the file and hit Command+I. In the Name & Extension field of the dialog box that appears, remove the extension.
Note that removing the extension by simply renaming the file by any other method probably won’t work, depending on your system’s settings—the file will retain the extension but give the appearance of not doing so.
Don’t forget to restore the file extension after attempting to open it!
Lock Files for Safety
You can manually lock any file on your Mac, which will prevent edits or deletion until the file is specifically unlocked. This can be useful if you have a master version of a file, for example, that you want to ensure remains sacrosanct. Folders can also be locked, which will prevent the folder or its contents from being edited or deleted.
If you try to edit a locked file, you’ll be warned and will have to specifically opt to unlock the file.
Locking Files via File Info: There are several ways to lock a file or folder. The easiest is simply to select the file or folder in Finder or on the desktop and hit Command+I to open the File Info dialog box. Then put a check in the Locked box under the General heading.
To unlock a file or folder later, simply repeat the steps and remove the check.
Locking Files via Applications: Certain applications, including those built into macOS such as TextEdit, support file locking from within the application. Click the filename in the window’s title bar, and select Locked from the pop-up menu that appears.
Where does this file live?
Sometimes I open a file for editing, perhaps one attached to an email, and I have no idea where it’s stored on my computer. One option is to click File > Save to see this information in the Save As dialog box, but a much easier solution is to right-click the filename in the title bar of the program window.
This will show a hierarchical display of folders. The top one nearest the file’s icon will be where the file is stored. The second one from the top will be where the parent of that folder is, and so on, going right back to the name of the hard disk and then the name of your computer, which should be the last in the list.
Selecting any entry in the list will open that folder (or disk) in Finder for browsing.
If your printer is compatible with envelopes, you can use the Contacts app to print addresses on them. Just select a contact, and then click File > Print. Selecting multiple contacts will let you print more than one envelope at a time. This tip works well if you create groups of contacts.
Quickly Upload Files within Safari
If you’re uploading a file to a website in Safari, you might see a button on the webpage that—when clicked—opens a file-browsing dialog box in which you can choose the file.
To save a little time, you can usually just drag and drop the file from the desktop or a Finder window onto the button, saving the need to use the file browser. Click it to begin the upload procedure.
Switch Apps while editing a file
Let’s say you’re tweaking a photo in Preview and decide you need the full power of Adobe Photoshop.
Look at Preview’s title bar. You’ll see the name of the file currently being worked upon. To the left of this will be a small icon representing the file. This is known as the proxy icon. Click and hold it for a few seconds, and then drag and drop the icon to the Photoshop icon on your Dock or to the Photoshop icon in Applications. The most recent version of the file will open in Photoshop.
It’s a good idea to close Preview following this, although it should update each time the file is saved in the other app.
Instead of dropping the proxy icon onto the Dock icon, while still in the process of dragging the icon you can tap Command+Tab to bring up the application switcher and drop the proxy icon on top of the program’s icon in the switcher display.
Note that this same technique of dragging and dropping the proxy icon also works if you want to insert an image you’re working on into a word processing document (although this example could be any file type and any kind of document). In the image editor, save the file if you haven’t already, and then drag the proxy icon on top of the word processor or layout program’s window where you’d like to insert it. It will be inserted instantly.
Select Text like a pro
In some built-in Mac apps like TextEdit, as well as in Microsoft Office and Mozilla Firefox, it’s possible to select text in a variety of useful ways above and beyond simply clicking and dragging. (It doesn’t work in Pages).
Selecting Noncontiguous Regions: Holding down Command while clicking and dragging lets you select disparate sections of text. You could highlight one sentence at the beginning of a paragraph, for example, and while holding down Command, select another sentence at the end of a paragraph. Hitting Command+C will copy both to the clipboard. If you hit Command+V to paste, the two sentence components will be pasted on two separate lines.
Selecting Square or Rectangular Blocks of Text: Holding down Alt (Option) will let you select rectangular blocks of text within a paragraph. This is hard to describe, so give it a try by holding down Alt (Option) and clicking and dragging within a paragraph of text (hold Alt (Option)+Command in older versions of Microsoft Word). This is another tip that may or may not work in your app.
Again, hitting Command+C will copy it, and hitting Command+V will paste it. It’s hard to imagine how this would ever be useful, but you might find a use for it!
Selecting Without Dragging: By clicking at the beginning of the region of text you want to select and then holding Shift and clicking at the end of the region, you’ll select everything in between. This works best when editing a document, and not on web pages.
If you’ve already made a text selection, you can hold down Shift and click either side of it to add text to the selection. Clicking within the selection while holding down Shift will let you subtract letters and words from the selection.
See Numbers in Huge Type for Easy Jotting
Have you ever wanted to jot down a phone number from the screen but found it difficult because you had to keep looking back and forth from screen to page, constantly losing your place on the screen?
In TextEdit and the Contacts app you can simply highlight the telephone number, right-click it, and select Large Type. This works in Mail messages too, although you might also be able to hover the mouse over the phone number until an arrow icon appears and click it, selecting Large Type from the menu that appears. Note that this works only for messages you’ve received in Mail and not for ones you’re composing.
This also works when using Calculator, letting you view the result of calculations—right-click the numbers on the LCD screen and then select Large Type.
In each case, the text will then be displayed in large floating text that fills the width of the screen. To get rid of it, just click anywhere
Cancel Dialog Boxes Instantly
One of the oldest Mac keyboard shortcuts is Command+. (full stop), which on very old Macs was used to cancel the current task.
In macOS it was deprecated but still lingers when it comes to dialog boxes—hitting Command+. will click the Cancel button for you, saving you the bother of reaching for your mouse.
Use Safari while booted to the recovery system
Hold down Command+R before the Apple logo appears during booting, and you’ll boot to the recovery system. Here you can perform disk checks, restore the system via Time Machine, and even reinstall OS X.
You can also unofficially launch apps that are installed within the main OS X installation, provided it’s still accessible (that is, your system isn’t damaged beyond repair). It isn’t intuitive to do this, but you might want to launch Safari to be able to research a problem you’re having.
While booted to the recovery system, click Utilities > Terminal, and then type the following:
Once you’ve finished, hit Command+Q twice to quit Safari as well as the Terminal window that launched it. This will return you to the main recovery options dialog box. To restart the computer, click the Apple menu, and then select the Restart option.
Invert a selection of files
Let’s say you’ve just downloaded 100 images from your digital camera. You want to copy all but three of them to another folder. How would you select just the 97 you want to copy?
Finder features a neat little trick to let you do just that quickly and easily. However, it works best on the desktop or in Icon view within Finder.
Start by selecting the files you don’t want to include in your selection. In my previous example, that would be the three files that we don’t want to copy. This can be done by holding down Command and selecting each.
Then press and hold the Command key and use the mouse to rubber-band select all the files—including the three you’ve already selected. You should find magic happens—the selection inverts so that files that weren’t selected now are and those that were are automatically unselected. In my example, 97 files would now be selected.