PDA

View Full Version : Can someone explain the iPod file system layout?


d1taylor
09-26-2003, 08:56 PM
I'm trying to figure out how the iPod lays out the music on the disk. When I'm in Terminal, I see this:
$ cd /Volumes/malu/iPod_Control/Music
$ ls
F00/ F02/ F04/ F06/ F08/ F10/ F12/ F14/ F16/ F18/
F01/ F03/ F05/ F07/ F09/ F11/ F13/ F15/ F17/ F19/

"malu" is a 5GB iPod. If I attach a 10GB unit, it also has F00-F19 folders in Music (within which are the specific mp3 files). Does every iPod have these 20 folders, or is it somehow related to the size of the iPod disk??

Thanks for any insight on this.

Dave Taylor

mervTormel
09-26-2003, 09:55 PM
i speculate it is a hash/cache technique to optimize disk/dir/file access.

if you look at the safari caches, you'll see something similar...

$ find Library/Caches/Safari/ -type d
Library/Caches/Safari/
Library/Caches/Safari/00
Library/Caches/Safari/00/00
Library/Caches/Safari/00/01
Library/Caches/Safari/00/02
Library/Caches/Safari/00/03
Library/Caches/Safari/00/04
Library/Caches/Safari/00/05
Library/Caches/Safari/00/06
Library/Caches/Safari/00/07
Library/Caches/Safari/00/08
Library/Caches/Safari/00/09
Library/Caches/Safari/00/10
Library/Caches/Safari/00/11
Library/Caches/Safari/00/12
Library/Caches/Safari/00/13
Library/Caches/Safari/00/14
Library/Caches/Safari/00/15
Library/Caches/Safari/01
Library/Caches/Safari/01/00
Library/Caches/Safari/01/01
Library/Caches/Safari/01/02
Library/Caches/Safari/01/03
...

it can be expensive for a process to navigate up and down a deep filesystem tree, so some cache/hash algorithm is implemented to optimize access on a relatively shallow namespace.

corroboration, anyone?