LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   cp will copy in any order, not alphanumeric (http://www.linuxquestions.org/questions/linux-software-2/cp-will-copy-in-any-order-not-alphanumeric-696346/)

DaveQB 01-10-2009 01:17 PM

cp will copy in any order, not alphanumeric
 
Hi,

I have now come across 2 devices that play back audio files back in timestamp order; the timestamp they were copied to the device.

I have found that cp and konqueror [and Windows for that matter] copy files in a real ad-hoc order, thus making the preservation of playlist orders impossible. So I have had to resort to copying each file, one-by-one in the order I want, alphanumeric.

Is this to be expected by cp ?


I have had to write a script now to get around this in a easier fashion
my blog post about this.

penguiniator 01-10-2009 04:33 PM

Yes, it is to be expected. The order of files on disk has nothing to do with their filenames, so if you want to copy files in alphanumeric filename order, a script is the way to go.

DaveQB 01-10-2009 09:04 PM

Interesting.

So curious, is it in inode order ?

penguiniator 01-10-2009 10:15 PM

Not necessarily. It depends on how the filesystem is designed. Inodes and filenames are not stored together, and filenames are not guaranteed to be in sort order.


All times are GMT -5. The time now is 01:06 AM.