Tag: OS X (Page 1 of 2)

Mac OS X tips…show and hide hidden files


As in Windows, by default MacOS doesn’t show hidden files, but unlike Windows that has a straight forward ‘Hidden Items’ option in the File Explorer View ribbon menu, MacOS doesn’t make it easy to toggle hidden files view on and off.

To do so you need to run a Terminal command.

Terminal Commands

From Applications > Utilities folder launch Terminal 

To show hidden files, enter following which will show hidden files then restart Finder:

defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

To hide hidden files, enter following to revert to hiding hidden files then restart Finder:

defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder

Create aliases for Terminal commands

If you don’t want to remember the above commands, you can easily create a Terminal alias

This is a direct lift from Ian Lunn’s blog. Ian explains the procedure and what commands are used to create a Terminal alias replacing the command lines above with easy to remember ‘showFiles‘, ‘hideFiles‘ commands:

  • From Applications > Utilities folder launch Terminal
  • In Terminal, enter sudo nano ~/.bash_profile and hit Return
  • Enter your Mac’s administration password if required, then hit Return
  • At the bottom of the open .bash_profile file, enter two new lines:
alias showFiles='defaults write com.apple.finder ~AppleShowAllFiles YES; killall Finder /System/Library/~CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder ~AppleShowAllFiles NO; killall Finder /System/Library/~CoreServices/Finder.app'
  • Press Ctrl+O and hit Return to save the file
  • Press Ctrl+X to exit the file and return to the command line
  • In Terminal, enter source ~/.bash_profile hit Return – this will refresh your profile and make the aliases available

Now when you want to show hidden files, all you need to do is open Terminal and enter showFiles. Enter hideFiles to revert to default and hide them

Creating Finder context menu item

To expand on this, Bert van Langen’s blog explains how you can use Automator with the commands outlined above to create a new Finder context menu item allowing you to toggle hidden files on and off directly from Finder:

  • From Applications folder launch Automator
  • Select Service as template type and click the Choose

  • In actions list, click Run Shell Script and drag it to the workflow pane. (Filter actions list by selecting Utilities from Library, or use the search menu)
  • At the top of the workflow pane set Service receives selected to files or folders and set in to Finder
  • Enter following into the Run Shell Script (replacing anything already there)
# Script to toggle hide/unhide hidden files in the Finder application.
# Author : Bert van Langen
# Created : 21 December 2014
STATUS='defaults read com.apple.finder AppleShowAllFiles'
if [ $STATUS == 1 ]
defaults write com.apple.finder AppleShowAllFiles -boolean false
defaults write com.apple.finder AppleShowAllFiles -boolean true
killall Finder
  • From File menu, select Save and then give the service a name – the name you select will appear as the menu item – e.g. Toggle Hidden Files. (Will be saved to /Users/Yourlogon/Library/Services)
  • Quit Automator

When you bring up the right-click context menu in Finder you will now see the new item Toggle Hidden Files which will execute the script to show/hide hidden files and restart Finder.


Mac OS X 10.9 Mavericks upgrade fail: OS X can’t be installed on the disk because a recovery system can’t be created.

The Mavericks upgrade didn’t go smoothly for me last week. Instead of an automated download and install I got an installation failure message

“Install Failed: OS X could not be installed on your computer. OS X can’t be installed on the disk because a recovery system can’t be created. Visit www.apple.com/support/no-recovery to learn more”

Looks like it’s to do with how Mavericks deals with Recovery Partition and for whatever reason my MacBook Pro wasn’t configured as the Mavericks installer expected.

Here’s what I had to do to fix it.

Note: If you want to give it a try, ensure that you have everything backed up beforehand – making changes to drive formats and partitions has the potential to go catastrophically wrong and I wouldn’t want you to lose any data.

1) Download Mavericks and make a boot USB.

Not absolutely necessary but considering Mavericks 5.29Gb size you may as well take the opportunity of creating a boot drive in case you need it.

See http://howto.cnet.com/8301-11310_39-57608836-285/how-to-create-a-bootable-os-x-mavericks-usb-install-drive

i) Download the Mavericks update file – don’t reboot

ii) Format USB drive as Mac OS Extended (Journaled), leaving the name as ‘Untitled’

iii) Open Terminal and enter

sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app –nointeraction

2) Remove your systems Recovery Partition and extend the Boot Partition

See http://derflounder.wordpress.com/2011/10/22/removing-and-rebuilding-a-malfunctioning-recover-hd-partition

i) Get the recover partition identifier. Open Terminal and enter:

diskutil list

ii) Remove the recovery partition. In Terminal enter following (using appropriate disk identifier from previous step):

Diskutil eraseVolume HFS+ ErasedDisk /dev/disk0s4

iii) Extend the boot partition. In Terminal enter following (using appropriate identifiers)

diskutil mergePartitions HFS+ MacHD disk0s3 disk0s4

3) Reboot your Mac from the USB drive and carry out the upgrade

Even then it wasn’t 100% flawless. The Mac booted to USB carried out upgrade ok but when complete it didn’t automatically reboot so needed a manual restart.

And when it finished Mavericks went through the process of creating a new user account rather than using what was already there and letting me logon to the saved profile. Fortunately I was able to log off and then on again using the previous account. (From which I could delete the new, unwanted one).


How To…Make Microsoft Office 2011 work properly on MacBook Pro Retina display

Last week released an update for Office 2011 for Mac which at last enables support for MacBook Pro retina displays.

The problem is installing it doesn’t make the applications automatically run with high resolution graphics.

A quick web search uncovered the explanation on CNET’s website.

The issue is that the OS doesn’t know that the apps have been updated and continue to run in rubbish, blurry low resolution mode.

To fix, launch Terminal and enter touch then a space, then drag the office apps from a Finder window into Terminal and press enter

The applications Info.plist file will be updated and the apps will now open in high resolution mode.

Strangely the 14.2.4 update was originally released on 19th September, though the Office update site and download page now date it as 27th September. Yet the article detailing the fixes is dated 19th September. No idea if there was a change form the original release, but nothing seems to be mentioned.

Update: 27/01/13. Sounds obvious, but same applies to other applications. LastFM scrobbler just updated and had the same problem. touch command sorted it out.


« Older posts

© 2021

Theme by Anders NorénUp ↑