This post is more than 5 years old
3 Posts
0
962
July 20th, 2007 10:00
file sort order?
Hi all. We have an EMC Celerra NS702g running Dart 5.5. The file system is formatted UFS. When we mount our NAS share as a network drive on a windows machine, the 'dir' command on this drive always returns the files in DATE order instead of NAME order.
As I understand, the 'dir' command without any switches uses the native sort of the underlying file system. Unfortunately, we have a piece of vendor software that is expecting the 'dir' command to always return files in alphabetical order. My storage folks tell me that this is a Windows settings or preferences problem, but we see the same behavior on any client. Inside Explorer the sorting is fine, but I would expect this since Explorer clearly sorts the files on its own.
1. Am I correct in understanding that this is an issue w/ the storage and not with the client?
2. If so, how can we change the sorting behavior on the NAS?
As I understand, the 'dir' command without any switches uses the native sort of the underlying file system. Unfortunately, we have a piece of vendor software that is expecting the 'dir' command to always return files in alphabetical order. My storage folks tell me that this is a Windows settings or preferences problem, but we see the same behavior on any client. Inside Explorer the sorting is fine, but I would expect this since Explorer clearly sorts the files on its own.
1. Am I correct in understanding that this is an issue w/ the storage and not with the client?
2. If so, how can we change the sorting behavior on the NAS?
0 events found
No Events found!


IanSchorr
117 Posts
0
July 24th, 2007 22:00
When we return directory results, they're returned in the order that they're stored in our directory(ies) (which is going to tend to be in the order they were created). No sorting is done before the results are returned - that's typically left up to the application (to sort in whichever way is appropriate).
-Ian
odonovan_kevin
33 Posts
0
July 23rd, 2007 05:00
Here's some of the DIR switches, including sorting switches
/P Pauses after each screen full of information.
/W Uses wide list format.
/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date & time (earliest first)
G Group directories first - Prefix to reverse order
A By Last Access Date (earliest first)
/S Displays files in specified directory and all subdirectories.
/B Uses bare format (no heading information or summary).
/L Uses lowercase.
/V Verbose mode.
/4 Displays year with 4 digits (ignored if /V also given).
jaf53
3 Posts
0
July 24th, 2007 05:00
Now no, we are not actually using the 'dir' as a shell command in the software. Its a java application using the File.listFiles method. According to the javadocs: "There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order."
Ok, so we know that our vendor's app should be doing the sorting... that's all well and good. However, if we point the application to a windows share that is attached EMC SAN, both the application and a dir command return the files in the correct alphabetical order (even though no sorting is specified).
But, if we put our files on the EMC NAS, both the dir command and the java application return the files by date order. The only difference is the NAS. Therefore, my conclusion is that there is some setting that causes the NAS to return files by default in date order? Does this make any sense?