LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-08-2011, 10:27 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
The file system and physical order.


Hi:

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?
 
Old 07-08-2011, 10:34 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

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

Sometimes I think you just think too complicated.
 
Old 07-08-2011, 10:44 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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.
 
Old 07-08-2011, 11:13 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

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
 
Old 07-08-2011, 12:12 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to tell if a RH system is virtual or physical unix1adm Linux - Server 4 02-11-2011 01:18 PM
Help ,Moving Linux System on a Virtual Machine (VMDK File) 2 Physical one shiko0o Linux - Newbie 2 07-01-2010 12:39 PM
[SOLVED] Moving Debian From a Virtual System to Physical Woodsman Debian 4 02-20-2010 06:04 PM
System suddenly changing disk order from BIOS order hscast Fedora 2 02-16-2010 09:09 PM
Ext3 File-system down after adding LVM physical device JZL240I-U Linux - Software 2 11-21-2005 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:57 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