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:
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:
You can easily get this information by typing in the following command in Terminal:
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?
Always view Image dimensions in Finder
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.
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.
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.
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:
Then I open the directory in Finder:
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.
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.
Juan Candi has claim the popular xFFFDPlaytime xFFFD audio clip that is included with Apple xFFFDs 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 xFFFDPlaytime xFFFD 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 Content xFFFD), 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.
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.
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.
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.
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.
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.
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
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/com.apple.metadata.mds.plist
and to turn it off, simple use:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
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.
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:
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.
Not Enough Watts
If you are suffering from some issues with your computer/device the root cause could be that your not allocating enough AC/DC power to the device. That is you think your sending 12 Watts to the device but in reality you are actually sending a lot less.
As a result of the device not having enough power you may encounter poor performance with the device and you may mistakenly blame the device for not working correctly. A couple of real world examples of this happening to me:
A few years ago I had a US Robotics modem that wasn't recording phone calls correctly. I checked every possible thing with the modem and couldn't understanding why it wasn't working. I discovered that I actually plug in the wrong power supply into the device, I plugged in a 5 watts power plug where the modem was expecting 8 watts. Once I found the right one everything worked fine.
More recently, I was having problems with my USB Satechi 12 Port USB hub. Every time I plug my iPhone or Amazon Kindle the devices would tell me that there wasn't enough power or the device wasn't supported. Turned out that the problem was I had too many things plugged into my power strip that all my devices were not getting enough power. To solve this, I simply removed the non-essential items and everything now works much better including my iMac Computer.
The life lesson here is that if your encountering any problems with your devices, you may also want to check to see if there's an issue with how much power the device is getting.
Last week Apple officially shipped the new 'Photos' application which will be the long awaited replacement for iPhoto. I have been waiting for this application because I really need to clean up my iPhoto library.
I installed the application last night and when to look into my Pictures folder in the Finder, I found the following listing:
This is all good, except that my hard drive is only 1 TB. Apple has once again managed to break the laws of physics they managed to double my physical disk space. In reality they didn't it looks to be a bug with how the OS is reading files.
The application does looks cool, but I still need to learn how it all works. I was disappointed that there's still no way to create a Smart Album based on a file size. This would make it super easy to remove very large movies.
It's time to clean up my iPhoto library. Currently it has 538.84 GB! That would take 114 DVDs to back it up! Since each DVD takes 20 mins to burn/verify, it will take 38 hours to backup my libary!
One practical alternative is to back up the photos/video to a USB flash drive. 64GB drives sell for about $30, and I can put certain events on each drive. For example, I can put 2012 photos on a couple of USB flash drive. (I expect to see a lot of deals during Black Friday!)
In iPhoto, If your trying to delete photos/videos from a Smart Album you may find that all the menu options for deleting are grayed out. (Even moving things to the trash can is not doable.) The way around that is to select the photos and they use the following keyboard combination: Command - Option - Backspace.
This will move the files to the trash. Empty the trash in iPhoto and then Empty the trash in the Finder to permanently remove the photos.
iMovie Audio Clips
If your doing a lot of YouTube Video Logs, there are many sites that offer great background sounds. You should know two of them that have excellent libraries for great background music aned effets when you need it. There's only so many times that you can use the Apple's Playful Sound Effect. Why not be unique and invest in something that will spice up your videos.
Pond5 - This is an open marketplace for buyers and sellers of royalty-free clips in all categories. Some of the clips can be pretty expensive. $34 for a 2 minute background music? Just make sure you know what your buying. After Effect text and Pre-Key Footage are really cool and really can add some professional touches to your videos.
Stereobot - Lots and Lots of background sounds. They can also be pricey but have a lot of good Playful alternatives to spice up your videos.
Audioblocks - A subscription service where you can download unlimited amounts of audio clips. Great selection and mix of music types.
Stuck DVD in iMac
Last night I encountered an issue where a blank DVD got stuck in my iMac computer. This happened because there was an clear empty disk stuck to the botton of the blank disk. Ya, it's hard to explain. I wasn't really paying attention and sort of forced the disk into the drive. As a results the computer wasn't able to eject the disk. I could here it try to eject the disk when I click on the eject button, but nothing was happening. Almost immediately I went searching online to find the solution to the problem.
Almost everything I read said that I was pretty much out of luck and would have to take it to a service center, or the Apple store to get fix. This of course means that it could cost a lot of money, since the computer isn't under warranty anymore. Also there's some risk that I could loose all the data on my computer. (Apple has a disclaimer that you should back up your entire computer before getting it service.)
I used some of my Macintosh experience and was able to get the disk out. Here's what I did to fix the problem:
- First I restarted the computer
- When the computer came back up I could hear the disk try to eject, but it wasn't coming out of the computer far enough for me to try to get it out.
- I opened up the Terminal Application and then typed in this command three times:
- drutil eject -drive internal
- The disk ejected just fine.
I am not sure exactly why restarting and then attempting to eject worked. But that's what it took to make it work. After I ejected it, I put in another DVD in the drive and was successfully able to burn data.