Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have ext2 in my disk. In directory path/ I have a set of .wav files. Together they integrate a musical work. So, if I make an audio CD of them, they must be written into the CD in a certain order.
But doing 'ls -U' on dir path/ I notice they're not in the correct order. When using k3b to make the CD, then drag'n drop 'path/' is not an option. The files in path/ must now be dragged one by one to respect order.
The .wav files were generated by a shell script in the correct order. But of course each file gets written in the first "hole" the OS finds and most probably the resulting physical order (the order in which ls -U lists them) will not be the same. If I create a new dir and run the script in this dir, the order is not warranted to be the correct one. Is there a way out of this?
K3B knows nothing about the physical order on the disk. If your .wav-files are named in the right order, for example Track_01.wav, Track_02.wav, ..., K3B uses this order for sorting the files. You can also put all the files you want to have on the CD at once into K3B's project window and sort them manually with drag&drop in there.
Well, if that is what k3b does, to follow lexicographical order, this is good news for me. I was generating them with these names: track_1, track_2, ..., track_10,... I shall now do it this way: track_01, track_02, ..., track_10,... Thanks a lot.
lexicographical order should read lexicographical order as set by your locale setting
Looking at the file names you use, the above is probably not appropriate for your above question but it does show that you don't have that much control on how and where files are written.
Here's a relevant example:
Code:
$ export LANG=POSIX
$ ls -la
total 32
-rw-r----- 1 druuna internet 0 Jul 8 18:04 .bar
-rw-r----- 1 druuna internet 0 Jul 8 18:04 .foo
-rw-r----- 1 druuna internet 0 Jul 8 18:04 Bar
-rw-r----- 1 druuna internet 0 Jul 8 18:04 Foo
-rw-r----- 1 druuna internet 0 Jul 8 18:04 bar
-rw-r----- 1 druuna internet 0 Jul 8 18:04 foo
$ export LANG=nl_NL
$ ls -la
totaal 32
-rw-r----- 1 druuna internet 0 2011-07-08 18:04 bar
-rw-r----- 1 druuna internet 0 2011-07-08 18:04 .bar
-rw-r----- 1 druuna internet 0 2011-07-08 18:04 Bar
-rw-r----- 1 druuna internet 0 2011-07-08 18:04 foo
-rw-r----- 1 druuna internet 0 2011-07-08 18:04 .foo
-rw-r----- 1 druuna internet 0 2011-07-08 18:04 Foo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.