Skip to Content

Terminal Tips: "Uninvisible" the invisible files on your iPod

visible music folderI've covered different ways to get your Music off of your iPod before, but now that I am going all nano all the time, and preparing to get rid of my 60GB iPod, I wanted a nice, quick, and easy way to get all those songs off of my old iPod. After conferring with Jay, who is much more the Unix geek than I, we figured out a method that would work. As with most things, it was happenstance that brought about the discovery. I was quizzing Jay on all the intricacies of the cp command, and had started running a basic command string to copy all the files from my iPod's invisible Music folder over to a 100GB external hard drive. I launched the Terminal (located in /Applications/Utilities/). And then I used the following command (all on one line; the break here is caused by a space in the command between the source and destination folders):

cp -R -v /Volumes/[MyiPodsName]/iPod_Control/Music /Volumes/[HardDrive]/

If you use this method, you will need to replace [MyiPodsName] with the actual name of your iPod. If there are any spaces in your iPod's name, you will have to escape them with \ (so, My iPod would need to be typed in as My\ iPod). The -R makes this command run through all the folders inside Music and the -v makes it run in verbose mode, so that all the current copying files will string by in your Terminal window.

Now the problem that I encountered while running this command is that all the copied files were still invisible. Here's where the happenstance came in to play.

Read after the jump for more...I cancelled the transfer, because I couldn't see any of the files, and Jay and I started talking about how we could make these files visible. Jay came up with a brilliant move. For this, first you must have the Developer Tools installed on your Mac. After Jay gave me this info, I went to bed and when I woke up I realized, "Why bother copying over and then making visible, when I could simply make it all visible up front and then simply drag and drop?" To do this, type in the following at the command line:

/Developer/Tools/SetFile -a v /Volumes/[MyiPodsName]/iPod_Control/Music/

This makes the Music folder visible, but the iPod_Control folder and all the folders inside the Music folder still remain invisible. So, next you must run this nearly identical command:

/Developer/Tools/SetFile -a v /Volumes/[MyiPodsName]/iPod_Control/Music/*

The * marks all the files inside the different folders inside the Music folder visible. Now, all you have to do is go back to the Terminal and type in:

open /Volumes/[MyiPodsName]/iPod_Control/

The iPod_Control folder will open up and the only files visible will be the iPod preferences file and your Music folder. Drag it over wherever you like. You could even simply drag it back into iTunes to copy all the songs off of your iPod back into your Music folder. If you ever want to turn the invisibility back on, simply run the same SetFile commands, but substitute a capitalized V for the lowercase v in the commands above. That's the visibility switch. Keep in mind, you can use this trick to "uninvisible" other invisible files on your system. Have fun!

Categories

iPod Family Hacks How-tos

I've covered different ways to get your Music off of your iPod before, but now that I am going all nano all the time, and preparing to get...
 

Add a Comment

*0 / 3000 Character Maximum

14 Comments

Filter by:
brian

If all you want is the music, just cd /Volumes/iPodName/iPod_Control/Music and then cp -r ./* ~/Music/ and the songs will all be copied to your Music folder with no visibility issues, unless they've changed something very recently in an iPod update. Last time I did this was 3-4 months ago. If you were having problems, my guess is a) this is something Apple added very recently or b) using the full path like you did kept some invisibility attribute. Ooh, or maybe this: 'cp' in 10.3 and earlier will strip resource forks, which might contain visibility info, while cp in 10.4 will copy two-part Mac files just fine, thus preserving an 'invisible' resource flag. Hmm... I'll have to check that out.

October 02 2005 at 9:02 PM Report abuse rate up rate down Reply
Travis Cripps

Rice, You have a good idea, but the files in question are not "invisible" to the Finder because they are unix "dot" files, which are not listed in a standard directory listing ("ls") without the extra flag "-a". They are invisible to the Finder because there's an HFS+ meta-data attribute that controls visibility in the finder. The developer command-line tool "setFile" can manipulate values in the Finder's meta-data for files, and that's how this tip makes the files visible to the Finder.

October 02 2005 at 6:43 PM Report abuse rate up rate down Reply
Rice Cooka

My UNIX knowledge is way rusty (and never too extensive in the first place) but, can't you just use mv to change invisible files to visible ones? mv .nameOfFolder nameOfFolder of course, this assumes that all the iPod music is in one big invisible folder you can just switch over.

October 02 2005 at 11:21 AM Report abuse rate up rate down Reply
John

Nick, if you want to learn about the command line I suggest O'Reilly's "Learning Unix for Mac OS X": http://www.oreilly.com/catalog/ltigerunix/

October 02 2005 at 11:02 AM Report abuse rate up rate down Reply
John Henry

You can use InVisibles instead of the terminal. http://www.mac4ever.de/invisibles/

October 02 2005 at 2:09 AM Report abuse rate up rate down Reply
Sam

Michael, The backslash is the escape character, and it was added automatically when you dragged your ipod to the terminal window. Use backslashes in the shell whenever navigating to a directory or using a file with a forbidden character, like a space or an ampersand. ex: cd /Volumes/Macintosh HD/Users/home/Files & Folders/

October 01 2005 at 6:22 PM Report abuse rate up rate down Reply
Carbunkle

Or you could just get Tinker Tool and unhide all files, drag and drop and rehide. Plus Tinker Tool's free and has a ton of other really useful 'hacks' that you'd normally need to dig into the terminal for.

October 01 2005 at 5:34 PM Report abuse rate up rate down Reply
Nick

I have had my eMac for 2 or 3 years, and I love it. My problem, is that I know nothing about command line stuff. If I want to learn it (Linux/Terminal/DOS?) and applescript or other scripting, where should I go?

October 01 2005 at 2:31 PM Report abuse rate up rate down Reply
svelo

just, ls -la /Volumes/(name of iPod)/ in Terminal, and it will show you everything on it

October 01 2005 at 12:13 PM Report abuse rate up rate down Reply
Florian Beer

Is it possible to "unhide" the files on the iPod and still use it normally (play Music, synching etc.)?

October 01 2005 at 10:50 AM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.