Filed under: iPod Family, Hacks, How-tos
Terminal Tips: "Uninvisible" the invisible files on your iPod
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 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...
/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!

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Michael May said 10:17AM on 10-01-2005
cool!
but my iPod's got a space in its name, and I'm not a Terminal junkie, so don't have a clue what to do about it. help?
Reply
Michael May said 10:19AM on 10-01-2005
never mind, dragging saved me!
it's (in my case) MICHAEL_S I/
Reply
boom said 10:20AM on 10-01-2005
there are more elegant methods of retrieving music off you iPod... check versiontracker.com or ilounge.com for a list of software that does it for you... no need for terminal anything...
Reply
scruss said 10:42AM on 10-01-2005
Terminal will automatically escape spaces if you use tab completion; so '/Volumes/Stewart's iPod' could be entered by just typing:
/Vo[tab]St[tab]
Boom, the other methods you referred to may be more elegant, but this is free, and doesn't require software installation.
Reply
Florian Beer said 10:52AM on 10-01-2005
Is it possible to "unhide" the files on the iPod and still use it normally (play Music, synching etc.)?
Reply
iAm said 1:36PM on 10-01-2005
just, ls -la /Volumes/(name of iPod)/ in Terminal, and it will show you everything on it
Reply
Nick said 2:32PM on 10-01-2005
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?
Reply
Tom said 5:35PM on 10-01-2005
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.
Reply
sam said 6:23PM on 10-01-2005
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/
Reply
John Henry said 2:09AM on 10-02-2005
You can use InVisibles instead of the terminal.
http://www.mac4ever.de/invisibles/
Reply
pigfoot said 11:04AM on 10-02-2005
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/
Reply
Rice Cooka said 11:22AM on 10-02-2005
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.
Reply
Travis Cripps said 6:44PM on 10-02-2005
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.
Reply
brian said 9:04PM on 10-02-2005
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.
Reply