Re: Linux needs to be taught how to count...
From: Sybren Stüvel (sybrenUSE_at_YOURthirdtower.imagination.com)
Date: 12/14/03
- Next message: Sybren Stüvel: "Re: disable passwd's password check"
- Previous message: paul: "Linux needs to be taught how to count..."
- In reply to: paul: "Linux needs to be taught how to count..."
- Next in thread: Circuit Breaker: "Re: Linux needs to be taught how to count..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 14 Dec 2003 18:58:44 +0100
On Sun, 14 Dec 2003 17:45:49 +0000, paul wrote:
> How does one get Linux to not automatically sort the directory contents
> by number?
Because, as with everything else that is text-based, it is sorted by ASCII
code. That means that everything that starts with a 4 is smaller than
everything that starts with a 5. With "255.mp3" your computer sees a two,
two fives and ".mp3". Why should it interpret the numeric part of the file
name as 2*100+2*10+5? Now if you named your files "1" through "255"
without the .mp3 it would make some kind of sense (since the entire
filename is numeric) but not with non-numeric parts in it.
> I have a CDROM of 225 MP3's that are named one though two-hundred-twenty
> five. (1-255). When I go to burn the cdrom the programs automtically
> re-arrange the order, 1-9,then 100, 102 etc through 110, then 11, then
> 111 etc.
Which is the proper way. If you want everything to be ordered by number,
name them 001.mp3, 002.mp3 etc. Why do you care about the order in which
the files are burned anyway?
> It's like Linux cannot count properly.
It can, trust me.
Sybren
-- (o_ Q: God, root, what is difference? //\ A: God can change the byte order on the CPU, root can't. V_/_
- Next message: Sybren Stüvel: "Re: disable passwd's password check"
- Previous message: paul: "Linux needs to be taught how to count..."
- In reply to: paul: "Linux needs to be taught how to count..."
- Next in thread: Circuit Breaker: "Re: Linux needs to be taught how to count..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|