Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Store MP3s only on an iPod to save hard drive space Apps
I have a lot of MP3s, and a pretty small hard drive (40GB) -- my brother's iPod is actually as roomy as my computer's hard drive! I tend to import a lot of songs, but I don't want to keep the files once iTunes has synched to the iPod. So the problem is how can I keep adding songs regularly to the iPod, but keep iTunes' synching feature working (as in not having it delete songs on the iPod which it doesn't find on my Mac anymore).

The trick is to import the songs in iTunes without copying them to the Library(set that option in iTunes' Preferences), synching with the iPod, and then truncating all the synched MP3s in the Mac's iTunes library to 0 bytes. However, this command, which you might think would work...
~/incoming music> find . -name * -exec echo ""| cat > {} \;
... fails miserably. So instead, you can compile the following C program:
#include <stdlib.h>

int main(int argc, char **argv) {
    char *target = argv[1];

    FILE *file = fopen(target, "w");
    fclose(file);
}
Compile it with g++, and use it in the find command as follows (assuming you named it truncate:
~/incoming music> find . -name *.mp3 -exec ./truncate {} \;
You can then sync again and admire how iTunes is tricked into thinking that the MP3s on the mac (which are 0 bytes in length) are still intact and identical to those on the iPod. Thus, iTunes simply avoids recopying them, leaving your iPod alone. Just remember to not completely erase those empty MP3 files on your Mac.

[robg adds: I haven't tested this one ... and if you do so, be careful with it and make sure you've got a good backup -- the code and find command will erase the contents of the MP3 files at or below the current subdirectory.]
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[8,840 views]  

Store MP3s only on an iPod to save hard drive space | 12 comments | Create New Account
Click here to return to the 'Store MP3s only on an iPod to save hard drive space' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Store MP3s only on an iPod to save hard drive space
Authored by: kirkmc on Mar 31, '05 10:24:02AM

And where do you back up your music files, for the day when your iPod has to be restored?

---
Read my blog: Kirkville -- http://www.mcelhearn.com
Musings, Opinion and Miscellanea, on Macs, iPods and more



[ Reply to This | # ]
Store MP3s only on an iPod to save hard drive space
Authored by: Fofer on Mar 31, '05 11:19:01AM

...or when the iPod is lost? Or stolen?

This is a bad idea, if you ask me. BEGGING for disaster.



[ Reply to This | # ]
Store MP3s only on an iPod to save hard drive space
Authored by: Thom on Mar 31, '05 10:34:04AM

...he'll cross that bridge when he falls off it.

I dropped a 250 GB external firewire drive once.

Only once!

Now, every single computer I own has an external FW drive with the same capacity as the internal HD, dedicated to backing it up. And soon, every external FW drive I own (excluding those being used to back things up, of course) will have its own twin to back IT up, etc...

Paranoid? Sure, but I feel a lot better.

Other World Computing sells Mercury 400 and 800 and USB2 drives which include copies of EMC/Dantz Retrospect Express.



[ Reply to This | # ]
Store MP3s only on an iPod to save hard drive space
Authored by: merlyn on Mar 31, '05 10:46:31AM

find . -type f -exec cp /dev/null {} \;
would have worked just fine, without having to compile a separate program.

[ Reply to This | # ]
Store MP3s only on an iPod to save hard drive space
Authored by: davoid on Oct 11, '06 03:41:40PM

True, I now use auto sync with my ipod and use the following command to truncate all the files to 0 bytes

[code]
find "." -name "*mp3" -exec cp /dev/null {} \;
[/code]
The reasoning behind is that my hard-drive is only 60gb, but the iPod stores 30gb. I don't want to also have the mp3's stored on the macbook's hard-drive.



[ Reply to This | # ]
Store MP3s only on an iPod to save hard drive space
Authored by: brianw on Mar 31, '05 11:18:23AM

What's the benefit of this versus just turning off synching? There must be something I'm not seeing.



[ Reply to This | # ]
I hate hints like this
Authored by: Lectrick on Mar 31, '05 12:58:05PM

I have to admit that I hate hints like this because if you care about your music at all, you WILL one day be sorry!! I recently had my iPod "lose" all my music after I disconnected it too soon, and if I hadn't been synchronizing it with my computer, all would have been lost. If you are too cheap to upgrade a 40 gigabyte hard drive after having purchased a $300+ 40gb iPod, then you deserve what's coming to you.

I have full-capacity backups of all my hard drives (i.e., two 250gb drives, etc.) and it has saved my butt more than once... Don't drive without a seatbelt and don't compute without a backup!! Your data is too important for cheap hints like this. Hard drives are cheap as heck these days, the cost savings is NOT worth the cost in labor it would take you to restore it all manually...

---
In /dev/null, no one can hear you scream



[ Reply to This | # ]
I hate hints like this
Authored by: ms_t_rie on Mar 31, '05 02:39:01PM

I think that's the part that is missing from the hint, at least one good backup should be somewhere!

I have my music off my Powerbook's hard drive (I can't just upgrade that so easily!) to save space, but I have a complete backup of the Powerbook drive, plus another backup of all the music. For me, I just disabled the auto-sync, it's easy enough for me to just drag the files onto the iPod manually.

If I ever have to reset the iPod, I'll just hook up the external drive which holds my backup and copy the music back on. In the meantime, I can enjoy having that extra 37GB returned on my limited space (60GB) Powerbook drive.



[ Reply to This | # ]
find -exec
Authored by: a1291762 on Mar 31, '05 05:15:23PM

> find . -name * -exec echo ""| cat > {} \;

The reason this fails is because | and > are interpreted by the shell, not by find. Also your {} isn't quoted so any spaces in the filenames are going to be mishandled. You can do the copy /dev/null thing or something like this:

find . -type f -exec sh -c ':> "{}"' \;

Find files and run a shell process which will execute :>"file". : is a null command and redirecting it's output to a file clears it. I use it because it shorter than other things lke echo "">file or cp /dev/null file.

Your -name * is evil. The shell will interpret that if it can which you probably don't want. It's not required anyway unless you do something like -name '*.mp3'



[ Reply to This | # ]
Store MP3s only on an iPod to save hard drive space
Authored by: bakalite on Mar 31, '05 05:45:42PM

1) There are plenty of reasons to store stuff on the ipod and not in itunes. Let's say you actually OWN the CD, yes, this does occasionally happen. Maybe you want to listen to it, but you don't need it on itunes. Or maybe it's an audio book, and you have the CD (or not) and you only want to listent to it once.

2) I don't get why the original poster doesn't just turn auto synching off.

3) Backup: All these backup methods you guys are talking about are very nice, until you have some file corruption and it spreads to your backup because you didn't realize it. If you actually care about your data, you need to have 2 backups, one off site, and they need to be incremental, meaning that you never delete anything. The easiest way to do this is with retrospect. I personally do not backup off site, but I have two incremental backups on site. Back when I had an all digital recording studio we used to say "If you don't have it in 3 places, you don't have it."

A good strategy for backups is to set the conditions so that your trash and a specific folder don't get backed up. This will keep the size of the backupsets reasonable, and you can put stuff you don't want to back up in that folder. You can even put it there and put the alias in the proper directory to keep things neat and tidy.



[ Reply to This | # ]
Nifty AppleScript solution
Authored by: FætterGuf on Mar 31, '05 11:08:01PM

This script rips a CD, transfers the tracks to an iPod and then deletes them from the local iTunes library:

http://www.dougscripts.com/itunes/scripts/scripts08.php?page=2#riptoipod

Works a treat!



[ Reply to This | # ]
Store MP3s only on an iPod to save hard drive space
Authored by: jiclark on Apr 01, '05 02:08:30PM

Question:

I have a friend that needs this functionality. He has an eMac with a 40GB drive and he just bought my old 40GB iPod when I updated to the iPod Photo... I told him the way to do it was to just use manual updating; that way, he can add and delete to his heart's content, even from CDs/DVDs loaded with backed-up MP3s, and keep his iTunes Library at a manageable size.

Am I missing something here? Will that not work?

Thanks,
John



[ Reply to This | # ]