Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #371959 > unrolled thread
| Started by | Don Y <this@is.not.me.com> |
|---|---|
| First post | 2015-08-07 00:38 -0700 |
| Last post | 2015-08-15 20:12 +0000 |
| Articles | 20 on this page of 30 — 13 participants |
Back to article view | Back to sci.electronics.design
OT: Sort directory *entries* Don Y <this@is.not.me.com> - 2015-08-07 00:38 -0700
Re: OT: Sort directory *entries* David Brown <david.brown@hesbynett.no> - 2015-08-07 10:06 +0200
Re: OT: Sort directory *entries* DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-08-07 05:29 -0400
Re: OT: Sort directory *entries* Don Y <this@is.not.me.com> - 2015-08-07 09:44 -0700
Re: OT: Sort directory *entries* makolber@yahoo.com - 2015-08-07 10:36 -0700
Re: OT: Sort directory *entries* Don Y <this@is.not.me.com> - 2015-08-07 10:59 -0700
Re: OT: Sort directory *entries* makolber@yahoo.com - 2015-08-07 13:07 -0700
Re: OT: Sort directory *entries* Don Y <this@is.not.me.com> - 2015-08-07 13:43 -0700
Re: OT: Sort directory *entries* M Philbrook <jamie_ka1lpa@charter.net> - 2015-08-07 18:43 -0400
Re: OT: Sort directory *entries* David Brown <david.brown@hesbynett.no> - 2015-08-08 22:21 +0200
Re: OT: Sort directory *entries* upsidedown@downunder.com - 2015-08-09 00:36 +0300
Re: OT: Sort directory *entries* Don Y <this@is.not.me.com> - 2015-08-08 14:45 -0700
Re: OT: Sort directory *entries* jurb6006@gmail.com - 2015-08-15 20:36 -0700
Re: OT: Sort directory *entries* Robert Baer <robertbaer@localnet.com> - 2015-08-07 22:12 -0700
Re: OT: Sort directory *entries* Don Y <this@is.not.me.com> - 2015-08-07 22:39 -0700
Re: OT: Sort directory *entries* David Brown <david.brown@hesbynett.no> - 2015-08-09 13:10 +0200
Re: OT: Sort directory *entries* DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-08-08 02:59 -0400
Re: OT: Sort directory *entries* whit3rd <whit3rd@gmail.com> - 2015-08-07 13:44 -0700
Re: OT: Sort directory *entries* Nobody <nobody@nowhere.invalid> - 2015-08-08 03:11 +0100
Re: OT: Sort directory *entries* Jasen Betts <jasen@xnet.co.nz> - 2015-08-08 03:55 +0000
Re: OT: Sort directory *entries* upsidedown@downunder.com - 2015-08-08 09:23 +0300
Re: OT: Sort directory *entries* Robert Baer <robertbaer@localnet.com> - 2015-08-07 22:11 -0700
Re: OT: Sort directory *entries* David Brown <david.brown@hesbynett.no> - 2015-08-08 22:28 +0200
Re: OT: Sort directory *entries* Don Y <this@is.not.me.com> - 2015-08-08 14:33 -0700
Re: OT: Sort directory *entries* Jasen Betts <jasen@xnet.co.nz> - 2015-08-09 04:15 +0000
Re: OT: Sort directory *entries* David Brown <david.brown@hesbynett.no> - 2015-08-09 13:21 +0200
Re: OT: Sort directory *entries* Robert Baer <robertbaer@localnet.com> - 2015-08-07 22:04 -0700
Re: OT: Sort directory *entries* DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-08-08 02:58 -0400
Re: OT: Sort directory *entries* Dimitrij Klingbeil <nospam@no-address.com> - 2015-08-15 21:38 +0200
Re: OT: Sort directory *entries* Rob <nomail@example.com> - 2015-08-15 20:12 +0000
Page 1 of 2 [1] 2 Next page →
| From | Don Y <this@is.not.me.com> |
|---|---|
| Date | 2015-08-07 00:38 -0700 |
| Subject | OT: Sort directory *entries* |
| Message-ID | <mq1n8j$276$1@speranza.aioe.org> |
Hi, Is there an established/built-in mechanism to reorder the dirent structs on Windows filesystems? Or, is it cheaper for me just to write a script to "coerce" things into the desired order?
[toc] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-08-07 10:06 +0200 |
| Message-ID | <mq1oq7$35m$1@dont-email.me> |
| In reply to | #371959 |
On 07/08/15 09:38, Don Y wrote: > Hi, > > Is there an established/built-in mechanism to reorder the dirent > structs on Windows filesystems? Or, is it cheaper for me just > to write a script to "coerce" things into the desired order? I take it you mean actually /change/ the order of the directory entries, rather than just make them look sorted. As far as I know, their is unlikely to be a way to do it for NTFS as the filesystem uses a B-Tree which does not track the order. So even if you individually copy files one-by-one into an NTFS directory, you will not get any particular order within the directory structures - adding a file could cause the B-Tree nodes to split with different divisions of the files. For FAT (and FAT32), it's a different matter - files are kept in a flat list in the directory structure, with an order than can easily be seen. Some devices (such as many MP3 players) handle files in that order. There are probably utilities for Windows that can re-order the entries. On Linux, there is "fatsort" which is often used for ordering files on USB sticks for music players.
[toc] | [prev] | [next] | [standalone]
| From | DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> |
|---|---|
| Date | 2015-08-07 05:29 -0400 |
| Message-ID | <cju8sap6as7kechj629mjnh9vodb00fd9d@4ax.com> |
| In reply to | #371960 |
On Fri, 07 Aug 2015 10:06:00 +0200, David Brown <david.brown@hesbynett.no> Gave us: >On 07/08/15 09:38, Don Y wrote: >> Hi, >> >> Is there an established/built-in mechanism to reorder the dirent >> structs on Windows filesystems? Or, is it cheaper for me just >> to write a script to "coerce" things into the desired order? > >I take it you mean actually /change/ the order of the directory entries, >rather than just make them look sorted. > >As far as I know, their is unlikely to be a way to do it for NTFS as the >filesystem uses a B-Tree which does not track the order. So even if you >individually copy files one-by-one into an NTFS directory, you will not >get any particular order within the directory structures - adding a file >could cause the B-Tree nodes to split with different divisions of the files. > >For FAT (and FAT32), it's a different matter - files are kept in a flat >list in the directory structure, with an order than can easily be seen. > Some devices (such as many MP3 players) handle files in that order. > >There are probably utilities for Windows that can re-order the entries. > On Linux, there is "fatsort" which is often used for ordering files on >USB sticks for music players. If you use a GPT initialization of the drive, you are no longer tied down in the max number of partitions you can create as with MSDOS initialized drives, so one could try some creative set-ups utilizing a large number of small partitions. I know this has nothing to do with the actual question you asked, but it is something to consider as a data storage scheme formation in one's modern thinking world.
[toc] | [prev] | [next] | [standalone]
| From | Don Y <this@is.not.me.com> |
|---|---|
| Date | 2015-08-07 09:44 -0700 |
| Message-ID | <mq2n8l$iai$1@speranza.aioe.org> |
| In reply to | #371960 |
Hi David, On 8/7/2015 1:06 AM, David Brown wrote: > On 07/08/15 09:38, Don Y wrote: >> >> Is there an established/built-in mechanism to reorder the dirent >> structs on Windows filesystems? Or, is it cheaper for me just >> to write a script to "coerce" things into the desired order? > > I take it you mean actually /change/ the order of the directory entries, > rather than just make them look sorted. Yes. Edit the directory itself. > As far as I know, their is unlikely to be a way to do it for NTFS as the > filesystem uses a B-Tree which does not track the order. So even if you > individually copy files one-by-one into an NTFS directory, you will not > get any particular order within the directory structures - adding a file > could cause the B-Tree nodes to split with different divisions of the files. > > For FAT (and FAT32), it's a different matter - files are kept in a flat > list in the directory structure, with an order than can easily be seen. > Some devices (such as many MP3 players) handle files in that order. Sorry, I should have mentioned FAT32. > There are probably utilities for Windows that can re-order the entries. > On Linux, there is "fatsort" which is often used for ordering files on > USB sticks for music players. I just hacked together a quick shell script to sort the "names" based on the criteria of interest, then moved them into a virgin directory. Done. I was hoping there might have just been some magic incantation to do this *for* me (e.g., Norton Utilities used to have this capability many aeons ago). Thx! --don
[toc] | [prev] | [next] | [standalone]
| From | makolber@yahoo.com |
|---|---|
| Date | 2015-08-07 10:36 -0700 |
| Message-ID | <279ddad6-1af6-4c37-b1f9-9be637c9d51b@googlegroups.com> |
| In reply to | #371982 |
> > > > For FAT (and FAT32), it's a different matter - files are kept in a flat > > list in the directory structure, with an order than can easily be seen. > > Some devices (such as many MP3 players) handle files in that order. > > Sorry, I should have mentioned FAT32. > > > There are probably utilities for Windows that can re-order the entries. > > On Linux, there is "fatsort" which is often used for ordering files on > > USB sticks for music players. > So how to do "see" the native order of the files in the directory via Windows. Mark
[toc] | [prev] | [next] | [standalone]
| From | Don Y <this@is.not.me.com> |
|---|---|
| Date | 2015-08-07 10:59 -0700 |
| Message-ID | <mq2rl5$tba$1@speranza.aioe.org> |
| In reply to | #371991 |
On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: > >>> For FAT (and FAT32), it's a different matter - files are kept in a flat >>> list in the directory structure, with an order than can easily be seen. >>> Some devices (such as many MP3 players) handle files in that order. >> >> Sorry, I should have mentioned FAT32. >> >>> There are probably utilities for Windows that can re-order the entries. >>> On Linux, there is "fatsort" which is often used for ordering files on >>> USB sticks for music players. > > So how to do "see" the native order of the files in the directory via Windows. You don't care what the a priori order is under windows. Rather, you "know" what the order *will* be when you recreate (move) the files into a virgin directory.
[toc] | [prev] | [next] | [standalone]
| From | makolber@yahoo.com |
|---|---|
| Date | 2015-08-07 13:07 -0700 |
| Message-ID | <7aa9e1ec-c5cb-4026-8e9b-f786a89bf5d4@googlegroups.com> |
| In reply to | #371993 |
On Friday, August 7, 2015 at 1:59:10 PM UTC-4, Don Y wrote: > On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: > > > >>> For FAT (and FAT32), it's a different matter - files are kept in a flat > >>> list in the directory structure, with an order than can easily be seen. > >>> Some devices (such as many MP3 players) handle files in that order. > >> > >> Sorry, I should have mentioned FAT32. > >> > >>> There are probably utilities for Windows that can re-order the entries. > >>> On Linux, there is "fatsort" which is often used for ordering files on > >>> USB sticks for music players. > > > > So how to do "see" the native order of the files in the directory via Windows. > > You don't care what the a priori order is under windows. Rather, > you "know" what the order *will* be when you recreate (move) the > files into a virgin directory. Allow me to clarify my question... I know windows displays the entry order sorted per hoe you click the column headers... My question is how do I then "see" the actual order that you have been discussing. You are right, I don't care what the actual order is when simply looking at the directory on a PC, but I do care becasue I will be copying the directory to an MP3 player. (which seems to play the files in some order that does not correspond to the windows display) So I can I determine (and edit) the directory entry order via windows? Mark
[toc] | [prev] | [next] | [standalone]
| From | Don Y <this@is.not.me.com> |
|---|---|
| Date | 2015-08-07 13:43 -0700 |
| Message-ID | <mq358t$nb6$1@speranza.aioe.org> |
| In reply to | #372006 |
On 8/7/2015 1:07 PM, makolber@yahoo.com wrote: >>> So how to do "see" the native order of the files in the directory via >>> Windows. >> >> You don't care what the a priori order is under windows. Rather, you >> "know" what the order *will* be when you recreate (move) the files into a >> virgin directory. > > Allow me to clarify my question... > > I know windows displays the entry order sorted per hoe you click the column > headers... In my case, I'm actually looking at a DOS box "directory listing". But, I take your meaning... > My question is how do I then "see" the actual order that you have been > discussing. AFAICT, you can't. Years ago, you could. But, MS keeps dicking with the user interface. E.g., "File 9" precedes "File 10" in the listing (which makes life easy for "commoners"... but is counterintuitive for anyone with any "experience") > You are right, I don't care what the actual order is when simply looking at > the directory on a PC, but I do care becasue I will be copying the directory > to an MP3 player. (which seems to play the files in some order that does not > correspond to the windows display) <frown> The MP3 player doesn't do a L-R alpha sort on names? I.e., wouldn't "01 - First Song" automatically be played before "02 - Another Song"? > So I can I determine (and edit) the directory entry order via windows? AFAICT, you can't see the order that the entries are stored in the directory. OTOH, you can simply copy them into another folder in the order that you would like them to appear -- based on whatever criteria you deem appropriate (file name, size, time of modification, reverse alpha by third letter of file name, etc.). You won't be able to *verify* this (on the PC) but you will "know it". You *may* be able to "Select All" and copy to another folder and notice the order in which the files are copied. ISTR that Windows doesn't sort them by any criteria when doing this "en masse".
[toc] | [prev] | [next] | [standalone]
| From | M Philbrook <jamie_ka1lpa@charter.net> |
|---|---|
| Date | 2015-08-07 18:43 -0400 |
| Message-ID | <MPG.302efeac37b9f569989caf@news.eternal-september.org> |
| In reply to | #372006 |
In article <7aa9e1ec-c5cb-4026-8e9b-f786a89bf5d4@googlegroups.com>, makolber@yahoo.com says... > > On Friday, August 7, 2015 at 1:59:10 PM UTC-4, Don Y wrote: > > On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: > > > > > >>> For FAT (and FAT32), it's a different matter - files are kept in a flat > > >>> list in the directory structure, with an order than can easily be seen. > > >>> Some devices (such as many MP3 players) handle files in that order. > > >> > > >> Sorry, I should have mentioned FAT32. > > >> > > >>> There are probably utilities for Windows that can re-order the entries. > > >>> On Linux, there is "fatsort" which is often used for ordering files on > > >>> USB sticks for music players. > > > > > > So how to do "see" the native order of the files in the directory via Windows. > > > > You don't care what the a priori order is under windows. Rather, > > you "know" what the order *will* be when you recreate (move) the > > files into a virgin directory. > > Allow me to clarify my question... > > I know windows displays the entry order sorted per hoe you click the column headers... > > My question is how do I then "see" the actual order that you have been discussing. > > You are right, I don't care what the actual order is when simply looking at the directory on a PC, but I do care becasue I will be copying the directory to an MP3 player. (which seems to play the files in some order that does not correspond to the windows display) > > So I can I determine (and edit) the directory entry order via windows? > > Mark I suppose you could always drop to console mode and do a Dir folderName \*.* > foldername\filename.txt. Look at it in notepad.. etc.. Something like that.. If you were a programmer it could be simple actually.. FindFirst(*.*), FindNext etc... Jamie
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-08-08 22:21 +0200 |
| Message-ID | <mq5o9t$373$1@dont-email.me> |
| In reply to | #372006 |
On 07/08/15 22:07, makolber@yahoo.com wrote: > On Friday, August 7, 2015 at 1:59:10 PM UTC-4, Don Y wrote: >> On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: >>> >>>>> For FAT (and FAT32), it's a different matter - files are kept >>>>> in a flat list in the directory structure, with an order than >>>>> can easily be seen. Some devices (such as many MP3 players) >>>>> handle files in that order. >>>> >>>> Sorry, I should have mentioned FAT32. >>>> >>>>> There are probably utilities for Windows that can re-order >>>>> the entries. On Linux, there is "fatsort" which is often used >>>>> for ordering files on USB sticks for music players. >>> >>> So how to do "see" the native order of the files in the directory >>> via Windows. >> >> You don't care what the a priori order is under windows. Rather, >> you "know" what the order *will* be when you recreate (move) the >> files into a virgin directory. > > Allow me to clarify my question... > > I know windows displays the entry order sorted per hoe you click the > column headers... > > My question is how do I then "see" the actual order that you have > been discussing. > > You are right, I don't care what the actual order is when simply > looking at the directory on a PC, but I do care becasue I will be > copying the directory to an MP3 player. (which seems to play the > files in some order that does not correspond to the windows display) > > So I can I determine (and edit) the directory entry order via > windows? > > Mark > Open a command prompt, go to the directory, and type "dir" without any ordering switches (and without any DIRCMD environment variable). That should show the files in natural order. Unless, of course, MS has fiddled with it in later versions of Windows...
[toc] | [prev] | [next] | [standalone]
| From | upsidedown@downunder.com |
|---|---|
| Date | 2015-08-09 00:36 +0300 |
| Message-ID | <2etcsalk427b3uvaqlunv3ujsl066bs68m@4ax.com> |
| In reply to | #372107 |
On Sat, 08 Aug 2015 22:21:51 +0200, David Brown <david.brown@hesbynett.no> wrote: >On 07/08/15 22:07, makolber@yahoo.com wrote: >> On Friday, August 7, 2015 at 1:59:10 PM UTC-4, Don Y wrote: >>> On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: >>>> >>>>>> For FAT (and FAT32), it's a different matter - files are kept >>>>>> in a flat list in the directory structure, with an order than >>>>>> can easily be seen. Some devices (such as many MP3 players) >>>>>> handle files in that order. >>>>> >>>>> Sorry, I should have mentioned FAT32. >>>>> >>>>>> There are probably utilities for Windows that can re-order >>>>>> the entries. On Linux, there is "fatsort" which is often used >>>>>> for ordering files on USB sticks for music players. >>>> >>>> So how to do "see" the native order of the files in the directory >>>> via Windows. >>> >>> You don't care what the a priori order is under windows. Rather, >>> you "know" what the order *will* be when you recreate (move) the >>> files into a virgin directory. >> >> Allow me to clarify my question... >> >> I know windows displays the entry order sorted per hoe you click the >> column headers... >> >> My question is how do I then "see" the actual order that you have >> been discussing. >> >> You are right, I don't care what the actual order is when simply >> looking at the directory on a PC, but I do care becasue I will be >> copying the directory to an MP3 player. (which seems to play the >> files in some order that does not correspond to the windows display) >> >> So I can I determine (and edit) the directory entry order via >> windows? >> >> Mark >> > >Open a command prompt, go to the directory, and type "dir" without any >ordering switches (and without any DIRCMD environment variable). That >should show the files in natural order. > >Unless, of course, MS has fiddled with it in later versions of Windows... At least on Win XP NTFS and later DIR is treated as DIR /ON, so the files are sorted by file name. Try DIR/O-N which should disable any sort activity.
[toc] | [prev] | [next] | [standalone]
| From | Don Y <this@is.not.me.com> |
|---|---|
| Date | 2015-08-08 14:45 -0700 |
| Message-ID | <mq5tab$ho8$1@speranza.aioe.org> |
| In reply to | #372112 |
On 8/8/2015 2:36 PM, upsidedown@downunder.com wrote: >> Open a command prompt, go to the directory, and type "dir" without any >> ordering switches (and without any DIRCMD environment variable). That >> should show the files in natural order. >> >> Unless, of course, MS has fiddled with it in later versions of Windows... > > At least on Win XP NTFS and later DIR is treated as DIR /ON, so the > files are sorted by file name. Try DIR/O-N which should disable any > sort activity. No. -N says "sort in reverse order by name" -- like "ls -r". All bets are off unless you are dealing with a FATxx filesystem. Furthermore, even there, you have no guarantee that the next creat() won't bugger the file order (e.g., if there is an open directory slot anywhere *before* the last entry that the new object can then occupy)
[toc] | [prev] | [next] | [standalone]
| From | jurb6006@gmail.com |
|---|---|
| Date | 2015-08-15 20:36 -0700 |
| Message-ID | <a24121a3-3868-473f-852b-47bb67efe1ff@googlegroups.com> |
| In reply to | #372115 |
I have been lurking. I am delurking. You want to arrainge the files in YOUR order. I got the idea. I have an example, in old IE, you favorites. If you never sort them they are in the order in which they were created. Sorting is something else. For example if you put some songs on a CCD in MP3 format, the order is the order in which you put them. But now make an audio CD and you do determine the order in which they play and actually I do believe how they are put on the disk. On a harddrive, this all mixed up shit is what it looks for when you defrag. (which is overrated) Andd I ownder wh this is an issue. Do you think that copying or making a backup will be interrup[ted and you ant the most importasnt (to you) files first ?
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2015-08-07 22:12 -0700 |
| Message-ID | <Ocgxx.23582$g72.711@fx12.iad> |
| In reply to | #371993 |
Don Y wrote: > On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: >> >>>> For FAT (and FAT32), it's a different matter - files are kept in a flat >>>> list in the directory structure, with an order than can easily be seen. >>>> Some devices (such as many MP3 players) handle files in that order. >>> >>> Sorry, I should have mentioned FAT32. >>> >>>> There are probably utilities for Windows that can re-order the entries. >>>> On Linux, there is "fatsort" which is often used for ordering files on >>>> USB sticks for music players. >> >> So how to do "see" the native order of the files in the directory via >> Windows. > > You don't care what the a priori order is under windows. Rather, > you "know" what the order *will* be when you recreate (move) the > files into a virgin directory. > NOT if that is NTFS.
[toc] | [prev] | [next] | [standalone]
| From | Don Y <this@is.not.me.com> |
|---|---|
| Date | 2015-08-07 22:39 -0700 |
| Message-ID | <mq44lk$g3g$1@speranza.aioe.org> |
| In reply to | #372045 |
On 8/7/2015 10:12 PM, Robert Baer wrote: > Don Y wrote: >> On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: >>> >>>>> For FAT (and FAT32), it's a different matter - files are kept in a flat >>>>> list in the directory structure, with an order than can easily be seen. >>>>> Some devices (such as many MP3 players) handle files in that order. >>>> >>>> Sorry, I should have mentioned FAT32. >>>> >>>>> There are probably utilities for Windows that can re-order the entries. >>>>> On Linux, there is "fatsort" which is often used for ordering files on >>>>> USB sticks for music players. >>> >>> So how to do "see" the native order of the files in the directory via >>> Windows. >> >> You don't care what the a priori order is under windows. Rather, >> you "know" what the order *will* be when you recreate (move) the >> files into a virgin directory. >> > NOT if that is NTFS. *Every* filesystem creates files and adds them to their "folders" in a predictable fashion. *You* just may not be able to internalize that ordering! There's no "random number" code built into a creat() call that causes a file to be placed in one spot "today" and another spot "tomorrow" -- all else being equal. What is important is the order in which objects (files) are added to the structure (whether that is the MFT or a "disk block" that encodes a folder structure). [If these algorithms weren't deterministic, all bets would be off and there'd be no advantage to using one particular structure over any other RANDOM structure!]
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-08-09 13:10 +0200 |
| Message-ID | <mq7cc9$e6h$1@dont-email.me> |
| In reply to | #372048 |
On 08/08/15 07:39, Don Y wrote: > On 8/7/2015 10:12 PM, Robert Baer wrote: >> Don Y wrote: >>> On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: >>>> >>>>>> For FAT (and FAT32), it's a different matter - files are kept in a >>>>>> flat >>>>>> list in the directory structure, with an order than can easily be >>>>>> seen. >>>>>> Some devices (such as many MP3 players) handle files in that order. >>>>> >>>>> Sorry, I should have mentioned FAT32. >>>>> >>>>>> There are probably utilities for Windows that can re-order the >>>>>> entries. >>>>>> On Linux, there is "fatsort" which is often used for ordering >>>>>> files on >>>>>> USB sticks for music players. >>>> >>>> So how to do "see" the native order of the files in the directory via >>>> Windows. >>> >>> You don't care what the a priori order is under windows. Rather, >>> you "know" what the order *will* be when you recreate (move) the >>> files into a virgin directory. >>> >> NOT if that is NTFS. > > *Every* filesystem creates files and adds them to their "folders" > in a predictable fashion. *You* just may not be able to internalize > that ordering! There's no "random number" code built into a creat() > call that causes a file to be placed in one spot "today" and > another spot "tomorrow" -- all else being equal. What is important > is the order in which objects (files) are added to the structure > (whether that is the MFT or a "disk block" that encodes a folder > structure). > > [If these algorithms weren't deterministic, all bets would be off > and there'd be no advantage to using one particular structure > over any other RANDOM structure!] > There is no particular reason to assume this has to be deterministic, or that there is a problem with being random. The VFS and filesystem layers have to be able to handle requests in non-deterministic orders - they don't know what apps may be running, or what they might want to do with files. And with the create requests coming in in non-deterministic ordering, there is no reason to suspect that they should be written to the filesystem itself in a deterministic order (by which I mean determined by the incoming order). In particular, a high-performance filesystem will re-order the storage or physical orders based on a more complete picture of the overall performance. This may include grouping writes, combining meta-data operations, re-ordering based on access times and disk head position, etc. Even if the code is entirely deterministic and repeatable for the same set of input parameters (as will usually be the case - /intentional/ randomness is sometimes used in low-level systems, but it is rare), the algorithms can be complex and the input parameters that affect it can include not just the order of incoming requests, but the times between them, timing and ordering information from the disk, the state of caches, and statistics about past behaviour of the processes. So you are correct that (baring any intentional true random behaviour) the filesystem will react the same way to two identical requests, all other things being equal - it is generally extraordinarily difficult to have all other things being equal. And while the filesystem will normally be fully deterministic, high-performance filesystems are typically very far from being predictable. So while access to a FAT system on removable media on Windows is intentionally made to be a simple and dumb system, and therefore has reasonably predictable ordering, the same does not apply on Linux, and it does not apply to NTFS on fixed media on Windows. (An example of intentional randomness is the random hold-off period sometimes used in network communication after collisions. Adding a bit of randomness can also improve the average behaviour of some algorithms by reducing the likelihood of pathological worst cases, such as when running a standard qsort on a sorted list. I have no idea whether this is actually used in real OS's.)
[toc] | [prev] | [next] | [standalone]
| From | DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> |
|---|---|
| Date | 2015-08-08 02:59 -0400 |
| Message-ID | <85absa1n050gh0a4p6obf0cqf3k1vc7fdq@4ax.com> |
| In reply to | #372045 |
On Fri, 07 Aug 2015 22:12:16 -0700, Robert Baer <robertbaer@localnet.com> Gave us: >Don Y wrote: >> On 8/7/2015 10:36 AM, makolber@yahoo.com wrote: >>> >>>>> For FAT (and FAT32), it's a different matter - files are kept in a flat >>>>> list in the directory structure, with an order than can easily be seen. >>>>> Some devices (such as many MP3 players) handle files in that order. >>>> >>>> Sorry, I should have mentioned FAT32. >>>> >>>>> There are probably utilities for Windows that can re-order the entries. >>>>> On Linux, there is "fatsort" which is often used for ordering files on >>>>> USB sticks for music players. >>> >>> So how to do "see" the native order of the files in the directory via >>> Windows. >> >> You don't care what the a priori order is under windows. Rather, >> you "know" what the order *will* be when you recreate (move) the >> files into a virgin directory. >> > NOT if that is NTFS. You are fucking lost, so I am quite sure that your true familiarity with anything about NTFS hovers near nil as well.
[toc] | [prev] | [next] | [standalone]
| From | whit3rd <whit3rd@gmail.com> |
|---|---|
| Date | 2015-08-07 13:44 -0700 |
| Message-ID | <77a5c3a6-b694-4733-b85f-a3a77b63bd1d@googlegroups.com> |
| In reply to | #371991 |
On Friday, August 7, 2015 at 10:37:02 AM UTC-7, mako...@yahoo.com wrote: > So how to do "see" the native order of the files in the directory via Windows. What, exactly is 'native order'? There are dozens of folks living on my block, they could be ordered by height, weight, street number, surname (alphabetically), age, shoe size... Native order isn't a well-defined attribute in a filesystem.
[toc] | [prev] | [next] | [standalone]
| From | Nobody <nobody@nowhere.invalid> |
|---|---|
| Date | 2015-08-08 03:11 +0100 |
| Message-ID | <pan.2015.08.08.02.11.01.647000@nowhere.invalid> |
| In reply to | #372008 |
On Fri, 07 Aug 2015 13:44:06 -0700, whit3rd wrote: > On Friday, August 7, 2015 at 10:37:02 AM UTC-7, mako...@yahoo.com wrote: > >> So how to do "see" the native order of the files in the directory via >> Windows. > > What, exactly is 'native order'? There are dozens of folks living on my > block, they could be ordered by height, weight, street number, surname > (alphabetically), age, shoe size... > Native order isn't a well-defined attribute in a filesystem. If readdir() (or equivalent) always returns the filenames in a specific order, that's the "native" order, i.e. the order in which programs which traverse a directory will process the files.
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2015-08-08 03:55 +0000 |
| Message-ID | <mq3ukd$qj5$1@gonzo.alcatraz> |
| In reply to | #372031 |
On 2015-08-08, Nobody <nobody@nowhere.invalid> wrote: > If readdir() (or equivalent) always returns the filenames in a specific > order, that's the "native" order, i.e. the order in which programs which > traverse a directory will process the files. no order is specified in the readdir documentation. -- \_(ツ)_
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | sci.electronics.design
csiph-web