Entries Tagged 'Mac OS X' ↓
January 3rd, 2011 — Mac OS X
I suppose a lot of the work I do could be called “low level” – tasks such as installing and configuring server applications and frameworks. It bugs me that the Finder doesn’t show ALL of the directories and files on a Mac. For example, lets say I want to work with the /usr/local/bin directory. I’m forced to use the Terminal because the Finder won’t display the /usr directory:

Well, it turns out there’s an easy fix for this. Open Terminal, enter the following command, and press Enter.
defaults write com.apple.Finder AppleShowAllFiles YES
The change will take effect after you restart Finder. The Windows way of doing such a thing would be to restart the computer. But we don’t do Windows, do we? Finder can be restarted like this: hold down the option key, click and hold the Finder icon in the dock, and when the context menu pops up choose Relaunch. As you can see in the following screenshot, the Finder now shows all hidden files and directories, including the Unix directories such as /usr.

If for whatever reason you find that you’d like to reverse the change, follow the same procedure except replace YES with NO.
defaults write com.apple.Finder AppleShowAllFiles NO
December 27th, 2010 — Mac OS X
I was working on a project and had copied a directory. I ended up with a Subversion issue because the original directory (and its subdirectories) were under version control. To clean things up, I needed to delete the .svn directories in my new directory and its subdirectories. Here are the steps I took to do so:
Use the find command to locate the .svn directories in the current directory and its subdirectories.

Find the .svn directories
Remove all of the .svn directories by piping the output of the find command to the rm command.

Remove the .svn directories
Use the find command once again to verify the .svn directories have indeed been removed.

Confirm the .svn directories are gone
July 21st, 2008 — Mac OS X
I’ve been having some trouble with my NAS device that led me to delete the directory I use for my Time Machine backups. As a result, I created a new directory and set up Time Machine to use it as I detailed in my previous post. Unfortunately, it didn’t work. Time Machine gave me an error saying “The backup disk image could not be created.”

Obviously something has changed since I first started using Time Machine with my NAS. I’m currently running OS X 10.5.4, so I’m assuming one of the updates “broke” this for me. I did some research and found a solution.
What I had to do was create the backup disk image locally, and then copy it to the NAS. Since the Time Machine error message indicated that creating the backup disk image was the problem (and presumable the only problem), this should fix things. Well, at least for now. If this much broke as the result of a software update, a future update my break it further. Anyway, I want to continue using my NAS for Time Machine backups as long as I can.
The name of the backup disk image file is a combination of the machine name and the MAC address of the machine being backed up, plus “sparsebundle”. The name of my iMac is “the-bronze” (Joss Whedon fans will understand). I went to System Preferences / Network to find the MAC address of my ethernet port, labeled below as “Ethernet ID.” There are numerous other ways to find the MAC address, but this seemed like the easiest way to me.

So the name of my backup disk image needs to be “the-bronze_0017f2de3895.sparsebundle.” To create that file, I opened a Terminal window and used hdiutil, an Apple command line program for working with disk images. Note that hdiutil is on my system by default – I haven’t installed anything special.
the-bronze:~ ron$ hdiutil create -fs HFS+J -volname "Backup of the-bronze" the-bronze_0017f2de3895.sparsebundle
hdiutil: create: WARNING: size unspecified and no other options imply a size
created: /Users/ron/the-bronze_0017f2de3895.sparsebundle
the-bronze:~ ron$
I copied the resulting file to my NAS, set up Time Machine as described in my previous post, and… it worked!

February 1st, 2008 — Mac OS X
Note: there is a also a second posting on this topic:
Use Time Machine with a Network Drive, Part 2
Recently, I decided to check out Time Machine, the backup utility that comes with Mac OS X Leopard. I have a 2TB Lacie storage device on my network that I use primarily for backups. Naturally, I wanted to have Time Machine use it for storage. Much to my dismay, I quickly found out that Time Machine is meant to work only with drives attached directly to your Mac. As you can see in the following screen capture, Time Machine didn’t recognize my Lacie drive as a drive that was eligible for use as a backup drive.
I know that Apple has announced a wireless network drive (named Time Capsule) for use with Time Machine. So why can’t I use my NAS with it? After some research, I found the solution. I opened Terminal and entered the following command:
When I opened up Time Machine again it recognized my NAS shares as “drives” that could be used for backup storage.
I’ve now been using Time Machine with my NAS for several days, and it appears to be working perfectly.
Use Time Machine with a Network Drive, Part 2