LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-10-2009, 12:17 PM   #1
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 387

Rep: Reputation: 38
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.
 
Old 01-10-2009, 03:33 PM   #2
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
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.
 
Old 01-10-2009, 08:04 PM   #3
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 387

Original Poster
Rep: Reputation: 38
Interesting.

So curious, is it in inode order ?
 
Old 01-10-2009, 09:15 PM   #4
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get cp to copy files in the right order? wizardhat Linux - Newbie 9 05-23-2012 12:38 AM
AUTO_INCREMENT + alphanumeric in MySQL? ta0kira Programming 12 10-03-2008 12:46 PM
arithmetic on alphanumeric in PERL gaynut Programming 2 09-08-2008 09:09 AM
C fstat, st_uid and alphanumeric userID banan Programming 2 10-08-2006 06:17 PM
Order your copy now! ctt1wbw Ubuntu 2 01-10-2006 07:33 AM


All times are GMT -5. The time now is 07:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration