Re: [opensuse] copying files to USB flashdisk in alphabetical order
On Monday, September 09, 2013 04:43:28 PM Dan Stromberg wrote:
On Mon, Sep 9, 2013 at 4:00 PM, John Andersen <jsamyth@gmail.com> wrote:
On 09/07/2013 10:13 AM, Istvan Gabor wrote:
Hello:
My old mp3 player plays the files in the order as they were copied to the disk.
Until now I used to copy the files in the correct order by this command:
find . -print0 | sort -z | xargs -0 cp -a --parents
--target-directory=/media/disk
This used to copy directories and their files recursively in
alphabetocal order.
But in openSUSE 12.2 it does not work. The files are copied to my sdcard in random order.
Why is this and how could I fix it?
Thanks,
Istvan
Maybe you should erase/reformat the card first?
*Often it'll work like this:
1) Erase the card 2) Copy files a, b and c to the card, in alphabetical order 3) Erase b 4) Copy d, e and f to the card, in alphabetical order 5) The card now has directory order a, d, c, e, f *
Confirms my suspicion that the card is really reporting arrival order. I too had a fairly brainded mp3 player that acted this way. Nuke and reload seemed to work. --
From the Myth of Me -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2013-09-09 at 17:24 -0700, John M Andersen wrote:
*Often it'll work like this:
1) Erase the card 2) Copy files a, b and c to the card, in alphabetical order 3) Erase b 4) Copy d, e and f to the card, in alphabetical order 5) The card now has directory order a, d, c, e, f *
Confirms my suspicion that the card is really reporting arrival order.
That's a FAT characteristic. The software in the player may not implement sorted directory listing (f.i., they use findfirst, findnext in msdos).
I too had a fairly brainded mp3 player that acted this way. Nuke and reload seemed to work.
Fast format should be enough. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIu/i4ACgkQtTMYHG2NR9VV/gCfcTLR/Ye0GLvQULp0JdsqjMR2 8E8AnAxfMd035+UFHusR7z2XGGR34vjd =2ZR/ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
2013. szeptember 10. 13:10 napon "Carlos E. R." <robin.listas@telefonica.net> írta:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Monday, 2013-09-09 at 17:24 -0700, John M Andersen wrote:
*Often it'll work like this:
1) Erase the card 2) Copy files a, b and c to the card, in alphabetical order 3) Erase b 4) Copy d, e and f to the card, in alphabetical order 5) The card now has directory order a, d, c, e, f *
Confirms my suspicion that the card is really reporting arrival order.
That's a FAT characteristic. The software in the player may not implement sorted directory listing (f.i., they use findfirst, findnext in msdos).
I too had a fairly brainded mp3 player that acted this way. Nuke and reload seemed to work.
My MP3 player plays the files in the order of their file-ID which are given to the files when they recorded on the card. This ID is independent from the file name, it is similar to ext3's inodes. I forgot how this ID is called exactly.
Fast format should be enough.
Previously this command worked without any formatting. Furthermore as I wrote in another answer, if I look how the files are appearing on the card, they are appearing randomly, not in alphabetical order (during the copy process). Does not this indicate that the files are sent randomly to the card? Nevertheless I will format the card to see if it fixes the issue. Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LNX.2.00.1309162205200.5380@Telcontar.valinor> On Wednesday, 2013-09-11 at 18:32 +0200, Istvan Gabor wrote:
2013. szeptember 10. 13:10 napon "Carlos E. R." <> írta:
That's a FAT characteristic. The software in the player may not implement sorted directory listing (f.i., they use findfirst, findnext in msdos).
I too had a fairly brainded mp3 player that acted this way. Nuke and reload seemed to work.
My MP3 player plays the files in the order of their file-ID which are given to the files when they recorded on the card. This ID is independent from the file name, it is similar to ext3's inodes. I forgot how this ID is called exactly.
File-ID? I don't know of such a thing IN FAT. :-? The directory structure in FAT is just a plain list with slots.
Fast format should be enough.
Previously this command worked without any formatting.
You mean this? find . -print0 | sort -z | xargs -0 cp -a --parents --target-directory=/media/disk Maybe we have to think whether the "cp" command is excueted in the right order, or if they are run all at the same time. Maybe my doubt is absurd. Try hand-copying files like 'a', 'b', 'c', and find out if they are created in correct order.
Furthermore as I wrote in another answer, if I look how the files are appearing on the card, they are appearing randomly, not in alphabetical order (during the copy process).
Does not this indicate that the files are sent randomly to the card?
Maybe. That's my doubt. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlI3Zh0ACgkQtTMYHG2NR9X8MQCfQ2AYyD41J+O9j/y9yt/u6KJx y/wAnRxwEMGMq/I6e16Tf/gdaDIp6ahA =4eTk -----END PGP SIGNATURE-----
participants (3)
-
Carlos E. R.
-
Istvan Gabor
-
John M Andersen