LinuxQuestions.org
Help answer threads with 0 replies.
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, 01:17 PM   #1
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Rep: Reputation: 39
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, 04: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, 09:04 PM   #3
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Original Poster
Rep: Reputation: 39
Interesting.

So curious, is it in inode order ?
 
Old 01-10-2009, 10: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 11 04-05-2020 03:53 AM
AUTO_INCREMENT + alphanumeric in MySQL? ta0kira Programming 12 10-03-2008 01:46 PM
arithmetic on alphanumeric in PERL gaynut Programming 2 09-08-2008 10:09 AM
C fstat, st_uid and alphanumeric userID banan Programming 2 10-08-2006 07:17 PM
Order your copy now! ctt1wbw Ubuntu 2 01-10-2006 08:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration