I was about to ask how to get this to work, but I think I might have solved it with another last look down the documentation before I clicked on the send button. I have an annoying little problem known as the iriver T60 audio player. It plays Ogg files from my PC perfectly well, but only in the same order in which it thinks they were copied onto its flash memory. It makes no attempt to sort the file names into alphabetical order to play them. So, if I just use Konqueror (I'm using Kubuntu Feisty) to drag whole directories of files onto it, the music plays just fine but the track order is all scrambled. However if I laboriously create the directories on the player myself, then manually drag the files onto it, one at a time, in the correct order, they play in the correct order. This, of course, is a PITA. So, I was thinking can I use rsync to do the job for me? Here is the command I've used:- rsync -rvtW --delay-updates --modify-window=1 /MiscUsersFiles/Music/Dave/T60/ /media/disk/Music/ I was hoping that the -W parameter might cause it to do the job, but no. The --delay-updates seems to be the proper magical incantation. The T60 now appears as disk in /media/ since I managed to foul it up properly and did a reformat (I'll see if I can set it back to T60 later). After an initial write of my music files to the freshly reformatted T60, every single album is now listed on the player in the correct order. So now the question is, does my use of the --delay-updates option increase the number of write cycles to the flash memory, or is it all sorted out in a buffer on the PC before everything gets transferred over the USB cable? Regards, Dave Fletcher -- Registered Linux user number 393408
On 9/22/07, David Fletcher <mailinglists@thefletchers.net> wrote:> It plays Ogg files from my PC perfectly well, but only in the same order in > which it thinks they were copied onto its flash memory. It makes no attempt > to sort the file names into alphabetical order to play them.I imagine the player is playing the files in the order their entries appear in the directory. Use "ls -U" to see this order. The order that results from a particular sequence of operations depends on the filesystem implementation.> However if I laboriously create the directories on the player myself, then > manually drag the files onto it, one at a time, in the correct order, they > play in the correct order. This, of course, is a PITA.Or you could write and use a shell script that copies the files one by one in the correct order. Even `cp /MiscUsersFiles/Music/Dave/T60/* /media/disk/Music/' might do the trick because the shell expands the wildcard into a list of filenames in alphabetical order.> I was hoping that the -W parameter might cause it to do the job, but no. > The --delay-updates seems to be the proper magical incantation.That's interesting. Rsync processes files in alphabetical order regardless of the --delay-updates setting. However, with --delay-updates, the files' temporary entries are in a subdirectory rather than the main destination directory, which may avoid disturbing the order of entries in the destination directory. Specifying a --temp-dir or using --inplace may have the same effect as --delay-updates.> After an initial write of my music files to the freshly reformatted T60, every > single album is now listed on the player in the correct order. So now the > question is, does my use of the --delay-updates option increase the number of > write cycles to the flash memory, or is it all sorted out in a buffer on the > PC before everything gets transferred over the USB cable?I'm guessing it is sorted out in a buffer on the PC. At least that's how writes to my Sony Cli?'s Memory Stick work: the light on the card doesn't blink until I either "sync" or attempt to unmount the card. In any event, based on en.wikipedia.org/wiki/Flash_memory#Limitations , I wouldn't worry about the write cycles. Matt