Count files in a directory under UNIX
Note to self:
A few ways to count files in a directory under UNIX:
ls | wc -l
For recursive:
find . -print | wc -l
Using filename matching:
find . -name \*.jpg -print | wc -l
Note to self:
A few ways to count files in a directory under UNIX:
ls | wc -l
For recursive:
find . -print | wc -l
Using filename matching:
find . -name \*.jpg -print | wc -l
For some reason this error has crept up on several of my machines recently when starting Adobe Photoshop CS 4 on the Mac:
“One or more files in the Adobe Application Support folder, necessary for running Photoshop, are missing. Please run the Photoshop installer and re-install Photoshop.”
Surprisingly, the solution was both quite simple and posted on Adobe’s website:
Solution 1: Copy the Adobe Unit Types file to Library/ScriptingAdditions.
Copy the Adobe Unit Types file in the Previous System folder to /Library/ScriptingAdditions.
Solution 2: Create a new ScriptingAdditions folder, and then reinstall Photoshop.
Create a new folder in /Library and name it ScriptingAdditions.
Remove and reinstall Photoshop.
Solution 3: Make sure there is not a space in the ScriptingAdditions folder name.
On two of my Snow Leopard machines, the ScriptingAdditions folder was missing. I restored from another computer and the error was gone. On my third machine, the file and folder were there, but the Adobe Unit Types file was created in 2005. After replacing with a more recent copy, I was back in business.
Update 02.03.10: Adobe has posted a new 64bit clean version of Adobe Unit Types.osax (version 2.1.0) in a TechNote titled “Error about unit type conversion occurs when running an AppleScript in Photoshop (Mac OS X 10.6).” This updated version works great for me on 10.6.2.
Facebook has launched “Prototypes” which are experimental features and applications built by Facebook engineers. This is similar to Google Labs in that you can access and even comment on upcoming features.
Prototypes can be managed or removed from the individual Application Settings pages. And from Facebook: “Please keep in mind they are sometimes buggy. They can also change very rapidly or be taken down without notice.”
In Snow Leopard (MacOS 10.6), you can toggle the viewing of invisible files by pressing Command-Shift-. (period) in any Open or Save dialog box. This is great for editing configuration files! (Files beginning with a . are normally invisible)
(via MacOSXhints)
iTunes 9 introduces a new iTunes Media Organization option. Previously, the iTunes folder is organized like:
The new organization scheme puts all content into folders related to the content within the iTunes Media Folder:
I decided to upgrade my organization by choosing File > Library > Organize Library. The process appeared to go very well with only 12 old artist folders remaining in in my iTunes Media folder.
After examining these remainders, I found that some contained orphaned music files, some had jpg files and some were just plain empty. I dragged the music files to iTunes (which immediately moved them on the new organization scheme), deleted the images and the remaining empty folders.
Then came the shocker, my next Time Machine backup wanted 400GB+ to complete. I let it backup, but I’m planning on going back and deleting my old iTunes Music folder in the backups once I’m satisfied that there are no orphaned files.
A quick check using “List MIAs,” tells me I’m clean, but experience says I should wait a few weeks.
Update: Apple has posted a support article titled: “iTunes 9: Understanding iTunes Media Organization”
Here’s my fix for the MobileMe keychain sync process wanting to delete all keychain items:
Complete the testing with a few back and forth syncs to make sure that a large number of changes aren’t detected. (This technique works well for other sync types, but deleting the data can be much more complicated depending on how it is stored.)
Kensington has announced a really useful new iPhone dock which adds a removable, external battery. The dock charges both the mini battery and the iPhone.
Mini Battery Pack is supposed to extend play time up to 30 hours of music, 6 hours of video & 3 hours of talk. Charge overnight and grab both devices for a full day of iPhone usage- slick!

[Kensington via iPodNN]
LogMeIn Ignition allows you to connect to and control your desktop computers just like if you were sitting in right front of them. The iPhone App works over any network connection, faster is obviously better, and is very easy to use.
With this software, you can:
After downloading, simply enter your credentials and you’ll be presented with of a list of computers where LogMeIn is installed and ready for action. If you haven’t installed LogMeIn on a desktop computer, you obviously won’t have any available destinations.
If you haven’t tried the desktop software, you’re in for a treat. The basic screen sharing is free and I’ve used it for years. The service is fast and just works. I’ve been able to connect in every network configuration I’ve tried, including firewall and double-NAT situations.
The iPhone software is pricey at $29.99, but considering how much I’ve used the free desktop sofware and the fact that there are no monthly fees, it’s worth it.
Logging in with LogMeIn.
My list of computers with LogMeIn installed.
My remote computer in glorious 320px of width!

Widescreen mode prior to zooming in.

A zoomed-in search.

A view of this posting.
LogMeIn - Remote Access and Desktop Control Software for Your Computer
LogMeIn Ignition (iTunes AppStore)
Fake Steve Jobs (FSJ) is on a rampage! The Google Chrome OS has started quite the fake feud with Eric “Squirrel Boy” Schmidt and the new and improved FSJ.

Read more on fakesteve: “Dear Eric: You’re dead to me”
The Nike + iPod on iPhone 3GS is pretty slick. Since it is an official Apple App, it gets the benefit of backgrounding. This means you can respond to SMS, take a quick picture or video and even Twitter without interrupting your workout progress. However, taking calls while in a Nike + iPod workout does indeed pause the workout according to Apple.

One of the more interesting things about Nike+ on the iPhone is that you can control the music with the Apple headphone remote. You can pause, skip, rewind, adjust volume and even run Voice Control to find out what song is playing! The only unfortunate thing about the Voice Control is that when it finishes, the song remains paused even though the workout is still running. To fix, just pause the workout with the remote and resume with one more tap. You’ll hear both the music and a confirmation that the workout has resumed.
I couldn’t help thinking how cool it would be if this product added GPS tracking similar to iMapMyRun. The Nike site already supports routes, but they must be entered manually. The accuracy of GPS plus stride tracking would be killler! Here’s to version 2.0-