Macintosh blog postings

Macintosh Postings

Earliest: June 26, 2003Latest: July 16, 2017Total: 199

December 4, 2015

Unix Yes

Using Term2, I was looking around some files in the /usr/bin folder to see if there's any cool command line graphic utilities that I could use. In Mac OS X El Capitan (10.11.1) there are 1,052 unix applications in the /usr/bin folder. Many of them I'll probably never use. For example, Why would I ever use eMacs when I have BBEdit?

I did encounter a strange program called 'yes' which sounded weird for a application file name. I checked the description in the manual (man yes) it says that:

yes outputs expletive, or, by default, ``y'', forever.

Turns out that's all the application does. So if you type in:

yes testing

You get the word 'testing' on a single line repeated forever. What is the purpose of this application? Why would anyone need to have a phrase repeated endlessly?

A few people have pointed out that it's useful when you encounter a application where you are prompt to fix an error repeatedly. Another user points out that the 'yes' command is useful when you need to test high loads of CPU on a system.

The most useful that I encountered is if you wanted to delete a bunch of files and didn't want to bother saying 'yes' on each state:

yes | rm *.txt

To me it seems to be a weird unix application that encountered.

Largest Files in /usr/bin

While going through all the other applications in the /usr/bin folder, I was thinking what were the largest applications in the directory. So here is the list of the top 20 largest files in the /usr/bin folder:

36M  emacs
10M  php
5.4M  parl5.18
5.2M  parl5.16
3.1M  emacs-undumped
2.1M  db_printlog
2.1M  db_codegen
2.1M  db_load
2.1M  db_hotbackup
2.1M  db_recover
2.1M  db_dump
2.1M  db_checkpoint
2.1M  db_deadlock
2.1M  db_archive
2.1M  db_upgrade
2.1M  db_verify
2.1M  db_stat
1.6M  ssh
1.5M  dig
1.5M  host

You can easily get this information by typing in the following command in Terminal:

ls -lahS

That will get you the listing of all the files in the current directory, sorted by file size. The file size are in blocks which is a bit easier to read for most people. Would you rather see 36M or 37236368?

November 26, 2015

Always view Image dimensions in Finder

Mac Image Dimensions Trick

Do you do a lot of work with images in MacOS? There's a cool trick to enable the image dimensions in the finder. This makes it easier to determine image sizes without having to view the image in Photoshop or Pixelmator.

Here are the simple step to get the image dimensions from appearing below the image.

  • With the Desktop selected, hit Command+J or pull down the View menu and choose "Show View Options"
  • Select the checkbox next to "Show Item Info"
  • Optional: If you want the setting to be applied to all Finder windows and folders, click the "Use as Defaults" button at the bottom, which will allow all folders to show the image information. Otherwise, this setting is just folder specific.
  • You'll notice that images will immediately show their dimensions. As a side effect, other Finder objects will also display information like item count and file size. Here is what the view option looks like toggled, and the image resolution shown under a few sample files in the Finder.

You can get this to work in any Finder window, just make sure the view is set to icons, otherwise you won't have the opportunity to set the "Show Item Info."

I like this trick because I do use PicMonkey to touch up some of my images and I want to make sure of the size before I email it.

November 22, 2015

Magic Mouse Batteries

Fact: The Duracell Batteries in my Apple Mouse last 28 days business days.

I put in new batteries on November 20, 2015, so that means I should plan on the needing to put new batteries in around the 4th of January. This is taking into account various holidays and upcoming PTO time.


A few weeks ago Apple announced the Magic Mouse 2, which is the next generation of their wireless mouse. The really cool thing is that you no longer need to buy batteries as the mouse can now be recharged via the lightning port. The downside is that this new mouse cost $79. I don't know if it's really worth that much to install batteries every once in a while.

Amazon Basic has 16 AA rechargeable batteries for $26.69, and that will last for a couple of years. Seems like a much better investment than getting a new mouse. I am thinking that they might even be cheaper over the next month or so.

October 27, 2015

Finding Lost Files after System Upgrade


I recently upgraded to El Capitan and notice that all of the dictionary files that I put in /usr/shar/dict were removed. In panic mode, I was scrambling around trying to see if I had copies of the files. I could find a few of the dictionary files but not all of them.

Then I remember that using Spotlight search tool only search for some of the files. A better search, especially Unix files is to use the UNIX find command tool. As the search will be more broad.

Using Terminal application, I searched for one of the files:

find / -name Huck.txt -print

Initially I was disappointed because I just saw a lot of directories that I didn?t have access to. Then, while scanning the listing, I saw this item:


Bingo! Apple actually made a backup copy of the files before removing them! Note: they didn?t move any of the installed system files in that directory such as /usr/share/dict/words and /usr/share/dict/words2

I immediately changed the directory to:

cd /Library/SystemMigration/History/Migration-A501F82A-4DC8-4EBB-BB72-9AB0C9490E82/QuarantineRoot/usr/share/

Then I open the directory in Finder:

open .

Then I copied the /dict folder to the desktop.

Crisis averted! So this doesn?t happen again, I am going to keep the contents of the folder in my Dropbox. That way I know I?ll have a copy on any computer that I have and I won?t have to worry about losing the file during the next update.

September 30, 2015

El Capitan Folder icon

Today is the launch of the next version of Mac OS X 10.11, called El Capitan. You can read up on the all the changes in the Ars Technica Review of OS X 10.11. One of the greatest features of today's release is once again that it's free.

In honor of today's launch, I created a folder image that incorporate the El Capitan logo. I did this because I was surprised that no one else has created a OS X 10.11 folder. This was a very quick implementation/hack.

Download the image file and follow the simple instructions to change a folder icon.

September 21, 2015

Juan Candi

iMovie Theme Music

Juan Candi has claim the popular xFFFDPlaytimexFFFD audio clip that is included with ApplexFFFDs iMovie. Apple includes 8 different Theme Musics with every iMovie installation. The 'Playtime' audio clips is very popular and used by thousands of iMovie enthusiasts. Chances are if you played with iMovie, you used the clip.

Today when I went to published a video clip that contain the xFFFDPlaytimexFFFD song as a background, YouTube mark the content as copyright material. Apparently this is part of Juan Candi music used in the recording titled Veterani.

I am unable to find any such artist or song on Google, Amazon or in the iTunes store. Does this artist even exist? The claimant to this copyright is Audiam - which sole purpose is to allow artist to monetize their music on YouTube.

To me it seems weird that any artist would be concern their music being used only in YouTube. I guess the thought process goes like this;Sure steal my song for your car commercial...but how dare you use it on YouTube as trivial background music.

All is good because according to Apple's iMovie Software License Agreement (Section C) you have the right to use the music:

You may use the Apple and third party audio content (xFFFDAudio ContentxFFFD), contained in or otherwise included with the Apple Software, on a royalty-free basis, to create your own original soundtracks for your video and audio projects. You may broadcast and/or distribute your own soundtracks that were created using the Audio Content, however, individual samples, sound sets, or audio content may not be commercially or otherwise distributed on a standalone basis, nor may they be repackaged in whole or in part as audio samples, sound files, sound effects or music beds.

Turns out that this isn't the first time this has happened. So fear not, it's only a matter of time before Google will fix the issue and remove the copyright violation.

September 4, 2015

Delete Muliple Flicker Albums

If you recently have discovered Flickr and how it's an awesome resource for backing up all your photos and videos. Flickr wants you to manage all your photos on their site, so much, that they have an application that will back up all the photos on your computer.

One of the problems with using the Flickr Uploader application is that Flickr creates a lot of albums, most of the albums are from folders. At first these are useful since it's easy to find certain files. Soon you begin to realized that Flickr has actually created albums for a single image. Now a lot of the albums are not useful.

After uploading a lot of images the albums become a real hassle. This is true if you use third party applications, such as PicMonkey. Having a lot of albums can make using Flickr slow and hard to scroll through all the extra albums.

Now comes the hard part of figuring a way to delete many Flickr albums. Turns out there is no way to manage Flickr albums in the Flickr Uploader tool.

If you check out Flickr's website, there's a way to organize your photos but this is more to organize photos into new or existing albums. You can delete a single album but if you have a couple 100 albums, this isn't a good option.

On the Albums page you can delete an album by clicking on the trash can icon. This is useful if you have a few albums to delete. Not so useful when there's a lot of files. Flickr help actually mentions that this is the best way to delete an album.

Easy Solution!

If you have your Flickr account connected to your Apple computer, you can use iPhoto to manage your photo albums! Apple's new Photo App can't help because as it turns out, that the new an improved application doesn't have any of the Photo Shared functionality that iPhoto has. So to make this work, you need Apple iPhoto.

If you haven't enabled Flickr on your Macintosh, you can easily do it. Before launching the iPhoto application, go to Settings and then select Internet Accounts. Click on the '+' to add your Flickr account to the computer.

Launch iPhoto and you should see your Flickr account name under the 'Shared' section of the left navigation. Click on your name and it will load up all the albums in the main window.

Click on the the albums that you want deleted, use the 'Control' to select multiple albums and then right click on your selection. Hold the 'command' key and click on the 'delete' key at the same time. Then select the button 'Delete Sets,' which will remove the album but not the photos in the albums.

Flickr Albums 

By using iPhoto you can quickly and safely delete hundreds of Flickr albums without deleting any of the images that were uploaded. I don't know of a way with Windows, perhaps someone can let me know and I'll write another post about it.

I hope this blog posting helps others that encounter the problems.

August 26, 2015

MacBook Pro Laptop


Yesterday I upgraded my Latitude E6520 laptop computer at work to a new MacBook Pro (Retina, 15-inch, Mid 2015). This is the first time in my career that I am using a Macintosh as my primary computer. I have used a Macintosh laptop in the past, but it's always been my personal laptop. It's great having the latest and greatest Macintosh laptop as my primary computer. I do have an iMac at home that I use when I work from home.

I was even more surprised when my desktop was replaced with a Thunderbolt display. My previous setup had a dual monitors with 1080x1950 resolutions; now I have a single monitor with 2560x1440 resolution. (I was able to figure out the resolution by taking a screenshot and then seeing the dimension of the image.)

It's been a long time since I been actively using a Macintosh laptop. My last one was a PowerBook G4 from 2003 and my most recent use would be for simple tasks, such as recording radio broadcasts and using an old version of Photoshop to touch up files. The Powerbook Titanium G4 has 70 GB hard drive and 8 GB of memory. This computer is so much thinner with a 500 GB flash drive and 16 GB of memory. It's amazing the difference of the computers when they are put side to side.

The first set of applications that I installed was TextExpander and Drop Box. I needed TextExpander because that's where I store my website login shortcuts. On Windows, I use Breevy and the application integrates with Text Expander very well. I store the database files in Drop Box and simply link it to my Text Expander on the new computer.

Other applications that were installed right away include Firefox, Evernote, Transmit, BBedit and Pixelmator.

I plan to keep things simple on this laptop. After backing up my Drop Box files to a DVD, I removed most of the files. I realized that there were a lot of files that I just didn't need on a regular bases. I plan to only install only essential applications.

August 21, 2015

Re-enable Spotlight Indexing

A few months ago I purposely turned off Spotlight indexing because the service would be running whenever I used the computer. As a result my computer suffered some serious performance issues to the point of frustration. Once the service was disabled, the computer seemed to run faster. Part of the problem was that I didn't have enough disk space available and the Spotlight indexing was using more memory than it should.

Yesterday, I decided to re-enable spotlight so that I could use some of the computer search capabilities. However, I encountered the following error when trying to restart the service.

I ran this command via Terminal:
sudo mdutil -a -i on

I got back the following error:
2015-08-19 21:46:42.541 mdutil[1155:170668] Metadata.framework [Error]: mdsCopyStorePaths failed: (268435459) (ipc/send) invalid destination portSpotlight server is disabled.

I research the error and it turns out that using the 'mdutil' command isn't the right way to restart the service. To successfully turn on Spotlight, simply run this:

sudo launchctl load -w /System/Library/LaunchDaemons/

and to turn it off, simple use:

sudo launchctl unload -w /System/Library/LaunchDaemons/

If your not familiar with sudo, it makes you run the launchctl command as the superuser. If you haven't setup the password for root, the password will be the primary user on your computer.

Keep in mind that when your re-enable Spotlight that indexing will happen right away. So think twice before turning it back on, and make sure to disconnect any external hard drives that you may not want to index right away.

June 19, 2015

Disk Space Usage

Did you know there is a very quick way to see what file types are mostly using up valuable disk space on your Macintosh hard drive?

If you go under the Apple menu and select "About this Mac" you'll get a dialog showing basic OS information. Select the "storage" and you'll see storage information on all the drives that are connected to your computer. This is the data from my computer:

Apple Space

Instantly you'll see how much Photos and Videos are taking up on your computer. Note that this is for your entire computer, so you may have photos and videos outside of iPhoto.

The only category that can be tricky is the "Other." This is basically the general bucket that's not worth breaking down any further. Apple has defined some of the 'Others' as being:

  • System files
  • Documents (Word, Excell, PDF, EPS etc...)
  • Zip and tar files
  • Disk Images
  • Browser Cache Data
  • Virtual Machine Drive Data file

If your running low on disk space, check out the storage tab for a quick glance at where you should purge first. Consider investing in some cloud storage to help you manage space on your computer.

I am still trying to figure out a good cloud storage solution for my videos. One option would be to burn them to a video DVD. There was once a time where I thought I would never use up my 1 terabyte drive.