[SOLVED] ls sorting issues

I've been trying to figure out why the ls command hasn't been working properly on my laptop. As far as I understand, the command should sort the output by alphabetical order. On my system, it does, but it also sorts the output by case. For example, here's some sample output:
$ ls -l
drwx------ 7 miles users 4.0K Sep 15 20:28 Downloads
... (omitted lines) ...
drwx------ 2 miles users 4.0K Sep 8 21:33 Vboxshare
drwx------ 3 miles users 4.0K Aug 6 04:04 VirtualBox VMs
drwxr-xr-x 7 miles users 4.0K Aug 13 04:01 abs
drwx------ 23 miles users 4.0K Aug 10 15:41 analysis
drwx------ 34 miles users 4.0K Aug 6 01:16 analysis2
... (omitted lines) ...
drwx------ 2 miles users 4.0K Aug 6 01:35 watch
-rw------- 1 miles users 2.7M Aug 6 01:03 1205.2960v1-1.pdf
-rw------- 1 miles users 274K Aug 6 01:03 1206.4152v1-1.pdf
-rw------- 1 miles users 110K Aug 6 01:03 2011 SummerHousingContract_3_.pdf
-rw------- 1 miles users 2.7K Aug 6 01:03 2011 SummerHousingContract_3_.xoj
-rw------- 1 miles users 66K Sep 10 11:59 Frosh Week starting 9-9.doc
-rw------- 1 miles users 19K Aug 6 01:12 Yucht_Miles_Resume.odt
-rw------- 1 miles users 215K Aug 6 01:12 Yucht_Miles_Resume.pdf
lrwxrwxrwx 1 miles users 22 Sep 13 10:00 cos -> school/fall2012/cos217
lrwxrwxrwx 1 miles users 23 Sep 15 19:52 isc -> school/fall2012/isc235/
... (omitted lines) ...
-rw------- 1 miles users 48K Aug 6 01:31 todo.xoj
-rw------- 1 miles users 680K Aug 6 01:35 vim_cheat_sheet.jpg
Ideally, the sorting should be case insensitive. Any ideas why this might be?
Last edited by yucht (2012-09-18 07:21:37)

Locale?
build@sakura[pts/2]:~$ LC_COLLATE="en_GB.UTF-8" ls -a
. .cache Documents .gnupg .local .ssh .viminfo .zshrc
.. .config Etc .history .ncmpcpp .tmux.conf .vimrc
builds .dbus .gitconfig .links .scripts Videos .zcompdump
build@sakura[pts/2]:~$ LC_COLLATE="C" ls -a
. .config .gnupg .local .ssh .vimrc Documents builds
.. .dbus .history .ncmpcpp .tmux.conf .zcompdump Etc
.cache .gitconfig .links .scripts .viminfo .zshrc Videos
EDIT: touched a few Capitalized files to show how LC_COLLATE affects them.
Last edited by WorMzy (2012-09-18 01:49:34)

Similar Messages

  • Query as a web service Sorting issue

    Hi All,
    We have designed an existing BI query as a web service but it seems to be ignoring the Sort order of different characteristics used (as defined in Bex Query Designer).
    Using the Context menu in QAAS and defining/managing the Sort is not working.
    Has anyone experienced such an issue and how to handle this?
    Thanks and Regards,
    Bansi

    Hi All,
    You can try this solution. It has something to do with the universe parameter, END_SQL.
    I implemented this as a work around and it solved our problem about the sorting issue with QAAWS.
    Here are the steps:
    1: Open the universe
    2. Ope File,  then Universe Parameter
    3. Click the parameter tab
    4. Scroll down until you see the 'END_SQL' entry. This entry is blank by default.
    5. Select END_SQL
    6. On the VALUE box, type: ORDER BY 1
    7. This will enable the REPLACE button. Click REPLACE
    8. Save the universe
    9 Test a query using 2 columns and view the SQL.
    You should see now the ORDER BY 1 inferred in the SQL statement.
    Voila!!!!
    Of course you can always add ORDER By 1,2,3 later if there's a need.
    Enjoy.....
    Ferdinand

  • I updated my Iphone 4s to IOS 7, now it reboots after every 2 minutes, I tried to restore, but the reboot gets it disconnected from PC, help me solve this reboot issue..

    I updated my Iphone 4s to IOS 7, now it reboots after every 2 minutes, I tried to restore, but the reboot gets it disconnected from PC, help me solve this reboot issue..

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    Be sure to Follow ALL the Steps...
    But... if the Device has been Modified... this will Not necessarily work.

  • Sorting issue after upgrade from 9i to 10g

    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T.

    903714 wrote:
    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T. This is expected behavior in 10g. Oracle will not order the dataset for you unless and until you explicitly specify it.
    So without using order by clause in 10g, oracle doesn't guarantee that rows will be ordered.
    To go back to old behavior like 9i, you can set a workaround by
    alter session set "_newsort_enabled"=false;
    Also see MOS - Order Of Data Retrieval Differs after upgrading 9i To 10g [ID 456707.1]

  • Finder sort issue

    I seem to be having a sorting issue.
    This order seems odd to me, but like to get your opinions about it.
    (This folder is sorted alphabetically by file name.)
    2008 01.doc
    2008 02.doc
    Activiteit_oktober.doc
    af 200802 - groen reserve.rtf
    af 200802 - groen.rtf
    af 20071130 - groen-geel.doc
    af 20080126 - groen.rtf
    af 20080216 avond - leiding WE.pages
    af 20080704 avond - groen & oranje.pages
    af 20080709 avond - bezinning.rtf
    idee spel.rtf
    In my logic the file 'af 20071130 - groen-geel.doc' should be before the two files beginning with 'af 200802' and not after. Or is this just me?

    In my logic the file 'af 20071130 - groen-geel.doc' should be before the two files beginning with 'af 200802' and not after. Or is this just me?
    OS X Finder sorts strings of digits according to their value, not digit by digit. 200802 is less than 20071130. Here is a note on the issue:
    http://homepage.mac.com/thgewecke/sorting.html

  • What's the perfect CHINESE FONT for iWeb to solved the Justified issue?

    Hi,
    Terible here, i'm using Chinese Font for my website...most of the Text Box were out of Justified unlike the perfect justified on English Font.
    Sorry i hope you understand what i'm trying to descript above.
    I'm wondering now, Is there any specific Chinese Font to solved the Justified issue?
    Now, everything looks fine in iWeb but when view it in Safari or any browser, there'll be out of Justified.
    Need helps and thanks!!!

    Could you provide your url so people can see what you are referring to?
    Have you tried the various Chinese fonts provided with OS X already?
    http://www.yale.edu/chinesemac/pages/fonts.html#Apple

  • I dropped my iphone 4 into the water and then i tried the rice method. The rice solved the water issue but now the screen won't work. what should i do?

    I  dropped my iphone 4 into the water and then i tried the rice method. The rice solved the water issue but now the screen won't work. what should i do?

    I guess your definition of "solved" is different from most...
    Make an appointment at the genius bar of your local Apple Store and get an out of warranty replacement.

  • Solving Centro hotsync issues without a hard reset

    I have a Centro (sprint).  I am running Windows Vista.  I cannot connect with hotsync.  Whenever I try, I get the following message -- "The connection between your handheld computer and the desktop could not be established.  Please check your setup and try again."  I went through the article referenced at the beginning of this forum and performed all the suggestions (reloaded Palm desktop 6.2, the outlook 2007 update, soft restart, etc.).  I took it to a repair center and they stated the ONLY way to fix it was to do a hard reset which would lose all info.  Since I can't hotsync, I haven't been able to backup the phone which means I'll lose everything.  I'm hoping there are some other suggestions I could try.  It seems contrary that the only way to solve a hotsync issue and save your data is to do a hard reset and lose all your data.  Thanks.
    Post relates to: Centro (Sprint)

    Is your Vista 64 bit or 32 bit? 
    Try performing a warm reset of your device... Take out the battery press and hold the UP button insert the battery while holding the UP navigator button wait until you see set date and time then release the button. Connect the phone back to the PC and try perform a hotsync.

  • Front Row sorting issues

    Hello,
    I know this issue has been posted several times and without any real solutions. But I'm going to ask again anyway in case the magical hacking gnomes have found a work-around.
    I have many sorting issues. There seems to be a lot of kvetching on here already about how Front Row sorts TV shows. But not only do my shows come up backwards within seasons, in some cases seasons themselves are out of order. For example, I have all 3 seasons of 30 Rock (purchased through iTMS) and they go season 1, season 3, season 2. Several other shows with multiple seasons are the same.
    But I also have a music sorting issue. The first part of this issue has to do with compilations. I've got several compilations in my library, and in iTunes I've sorted them by Various Artists rather than individual artists. In Front Row, if I scroll down to "V," there is no "Various Artists" like you might expect but instead a list of all the artists in all the compilations completely out of order. (Actually, they're ordered by their track number on the different albums. Yeah. That makes sense.) I could deal with these artists showing up in their normal places alphabetically, but not all lumped together under V.
    The other issue has to do with albums with one artist who has some tracks that feature other artists. Kanye West's "Graduation" is a good example. About half the tracks on the album are him "featuring Jamie Foxx," for example. So I put "Kanye West" in the sort field of this album so it displays properly in iTunes. Not only does this seem to have no effect on how things are sorted in Front Row, but there's actually multiple "Kanye West"s now, each one identical, as well as multiple "Kanye West feat. Jamie Foxx," lines and all the other multiple artist track. Uh...what?
    So I know that Front Row for some ridiculous reason is (a) not customizable and (b) operates under completely different sorting rules than iTunes (which makes no sense), but if anyone has any advice or tips or comments or whatever, that would be greatly appreciated.
    I've considered switching to a different media management program, but what I like about Front Row is its simplicity. I don't really feel like learning a whole new system (let alone getting my wife to buy into that idea). I've got better ways to spend my time. So, it's a trade off, I guess.
    Anyway, Apple Gods? Are you out there? Are you listening?

    I can't believe we're still banging on about the sorting problems. Apple have seen fit to provide a number of features to allow the user to get iTunes working the way they like, e.g. grouping compilation artists and the use of sort fields. I think you can now even keep compilation artists grouped on the iPod. But why oh why do they then totally ignore this for the AppleTV and Front Row (which look like the same codebase to me)?
    I have hundreds of genuine Artists that I want to see listed in the Artists' list, but not the thousands of others that appear on compilations. They don't even sort the artists by the Artist Sort field that they themselves provide in iTunes. This makes a nonsense of trying to use either the ATV or Front Row.
    Playlists are no help as they simply lump all contained tracks in one great list. Useless.
    The annoying thing is, they can get it right. iTunes just gets better and better in this regard, each release sorting out more of the omissions of earlier versions. But ATV and Front Row - nope, nothing. Still just as stupid as always. Just what will it take to convince Apple to 'sort' (ha) this out? How can they justify such entirely different ways of working on their different products?

  • How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5, How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5

    How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5, How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5

    Facetime is not in the App store. It is part of the iOS. You access Facetime on the phone via the contact section. Facetime needs to be activated in Settings. The only reason you may not have it is if you purchased the device in an area where Facetime is prohibited by law.

  • My free trial has expired a week into the trial. I have contacted support and they haven't solved the issue. Stated to use forum to solve my license issue for this computer.

    My free trial has expired a week into the trial. I have contacted support and they haven't solved the issue. Stated to use forum to solve my license issue for this computer.

    Did you have an Adobe trial running on this same computer before?  Maybe your previous trial was used for 3 weeks and then you uninstalled it?  If so, you're only eligible for a 1 week trial on this computer.
    Nancy O.

  • Solved IOS 6 issue with headphone remote

    Upgraded my Iphone 4S to IOS 6 and my Klipsch headphone remot would not work.  Volume buttons worked, and the center button would start playing music, but it would not stop or pause the songs.  I tried my original Apple earbugs with the remote and did not have any problems.  The I used the Klipsch again, and now they work great.
    Sounds strange, but that is what happened.

    Hi All,
    I was facing all sorts of issues with my earphone controls.
    This solved my problem.
    Double click home button. (press twice).This will show you all the apps that you have currently open.
    Long click on the 1st app in the list [about 3 seconds]. This will make the icons wiggle and show a red minus sign on the left hand top corner.
    Scroll [right] to see your music app (if you can't see it already).
    Press the red minus sign. This will completely close the music app.
    Restart your music app and things should be back to normal. [I also would close all other app in the same fashion, just in case, cause things like youtube apps use the controls on your earphones as well. ]
    In short: - kill, kill-em-all and restart your music app.

  • [Solved] Site display issues in Firefox 11.0-2/KDE 4.8.1

    I have been having issues with the form fields of the AUR page. Specifically, with any version of Firefox after v9; the fields are incredibly small. (See http://imgur.com/KEdYk for what it looks like). I have removed gtk-kde4, and even created a vanilla user with a brand-new home directory, and this other user profile experiences the same problem. edit: In a fresh install of GNOME 3, the AUR page displays correctly. Also displays correctly if I revert to FF v9
    This problem doesn't occur in Chromium, so I thought it was a FF issue, however, I've not heard of anybody else with this same problem... So I'm a little stumped. I filed a bug report a while back, (https://bugs.archlinux.org/task/28613 ), but it has been closed. Any help in diagnosing and/or fixing this issue would be helpful and appreciated. Thanks!
    Last edited by Axanon (2012-03-25 14:03:55)

    That is sounding quite strange.  I've had display issues similar to yours with login fields and search fields that are usually at the top of a we page appearing distorted and on top of each other.  Another prevalent problem that I noticed on YouTube was that text I enter into any field doesn't show up, but it is entered and I can search.  I'm running xfce so I don't know what to say.  Haven't had the problem in gnome, though I really don't like gnome 3 for its lack of what of what I considered organizational hierarchy.  (though I am against hierarchies of other sorts),  Ive also found that clearing the Firefox cache can solve some of these problems.

  • XQuery sorting issue

    Hi,
    Right now I am in a big trouble. I am new in XQuery, but right now I'm in a project using Xquery using PHP and XSLT..
    In our project we have large no. data (its a property listing site) and I'm storing that data to Berkeley DB (XML DB). The problem is when I am searching for a property its taking too much time for getting the result. The ORDER BY is creating the problem(Query 1).. with out sorting its working fine(Query 2). But for my project sorting is needed and its very impotent. So kindly please check my query(Query1) and please give me a solution as soon as possible. Following are the query:
    Query1:
    let $properties := (
    for $property in collection('bdb/properties.dbxml')/properties/property
    [( sale_price >=60000 and sale_price <=500000 ) and ( building_square_footage >=300 and building_square_footage <=3000 ) and ( bedrooms >=2 and bedrooms <=6 )]
    order by
    contains($property/mls_agent_id/text(), '505199') descending,
    matches($property/mls_office_id/text(), '^CBRR') ascending,
    $property/sale_price/number() descending
    return $property
    let $properties := subsequence($properties,10,10) return <properties>{$properties}</properties>
    Query 2:
    let $properties := (
    for $property in subsequence (
    collection('bdb/properties.dbxml')/properties/property
    [( sale_price >=60000 and sale_price <=500000 ) and ( building_square_footage >=300 and building_square_footage <=3000 ) and ( bedrooms >=2 and bedrooms <=6 )]
    , 1, 10)
    descending return $property
    ) return <properties>{$properties}</properties>
    Thank you,
    Vijesh
    Edited by: 893736 on Oct 28, 2011 10:28 AM
    Edited by: 893736 on Oct 28, 2011 10:33 AM

    Hi,
    Thank you for your reply.. right now there is a slight improvement in Query. But still i'm stucked with issue... also this project is also stucked...
    Now the problem is when I am searching for a property it will list the first 10 property quickly(100% speed). Then I'm going to 2dn, 3rd page its working in the same speed. But if I'm going to 10th(30% speed) or 100th or 1500th(15%speed) page is working very slowly.
    Following are my query:
    let $property_ids:=
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id,
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id,
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id
    return <properties>{
    for $id in subsequence($property_ids, 1, 10) return
    collection('bdb/properties.dbxml')/properties/property@property_id = $id
    }</properties>
    And some times query will change like the following way based on the filter option in my page(means sort by only sale_price field):
    let $property_ids:=
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id
    return <properties>{
    for $id in subsequence($property_ids, 1, 10) return
    collection('bdb/properties.dbxml')/properties/property@property_id = $id
    }</properties>
    then from the first page its self its performance is very slow(15%).
    Could you please check my query and help me to solve the issue...
    Thank you,
    Vijesh

  • 6th Gen sorting issues

    iPod software: 2.0.1
    iTunes software:.10.5.1.42
    Windows 7 Pro 64 bit SP 1
    I'm a strong supporter of proper sorting. So much so that I add the year of release to the Sorting > Sort Album field to bypass the alphabetical sorting iTunes seems to prefer.
    This is a minor issues in the grand scheme, but if someone can identify what I'm doing wrong, that would be awesome.
    In the early part of Prince's career, he released music as Prince (1981, 1982, 1987) and also as Prince and The Revolution (1984, 1985). Looking above to how I sort by year of release, I would prefer that these five albums sort chronologically, but with the correct artist names. On the iPod as of now, they sort as Prince (three albums), Prince and The Revolution (two albums), and Prince (three albums) again. Same three albums, same 34 songs, same art, same everything. I can make them sort correctly in iTunes, but not on the iPod.
    Thanks for any advice you might have!
    Screenshot of iTunes, then a (blurry) pic of the iPod:
    http://www.imagebam.com/image/e7e028161665617
    http://www.imagebam.com/image/d50356161665991

    I haD the same issue, and was thoroughly ticked off until doing some research and then trying couple things.
    I was able to change the volume limit, that WAS set at half.  I adjusted it to max volume, set a lock passcode, and away I drove.
    Then, upon hitting "play", I began to get a little ticked off.  I realized after a few minutes, I couldn't hear anything playing.
    It was so quiet- and I-95 is noisy, with me regretting buying another Apple product, after is wrote not to.
    So- after reading through a couple of these threads, I just adjusted the volume limit, and VOILA!
    It reverted to 50%.
    So, I did a total wipe, factory-reset it as new iPod.  I checked setting=>volume limit and it was at the 50% point again. First thing that I did was go to the last selection under settings menu, "reset settings" and noted it doesn't delete sync days, solely sys settings.
    I adjusted the volume limit to 100% immediately afterwards, set a new passcode and then.....
    Hit play.
    It worked. Plays just as loud as my original 3rd Gen iTouch. 
    So Dylan1219, maybe try that?  It's so simple, I am shocked that's how I fixed it.  It had been set- and always snapped back to the 50% mark.
    So, MAYBE that could solve the problem..?  I have hearing loss from rock &amp; roll and concerts, etc...so, thankfully this isn't a bunk product.  Just had a bunk setting. 
    It has stayed at Max level for hours now, and can state it solved it for me.
    I would hypothesize, all iPod classics are made the same, except for the "options"  of storage and color.  Maybe a small "governor" or a piece of extra firmware is added after the fact, or only "every 9th iPod" who knows for sure...? 

Maybe you are looking for

  • IPhoto Crashes all of the time. Attached Error Log. Please help?

    Attached is the error log. I've tried creating a new library and running disk utility. iPhoto crashes after a few minutes of use, especially when trying to edit photos. Any advice? The crashing is chronic and has occured for some time now (months). P

  • Why does the Amount slider on the Detail Panel reset to 0 when saving the file as a Smart Object?

    Whenever I open a Smart Object PSD file to adjust previous settings in RAW, I have noticed that the Amount slider in the Detail panel has reset to 0. Does this reduce the files sharpening? Is this a normal behavior? Can this be prevented? I use a Mac

  • I just update my iOS to lion. and now my itunes don't work. this is the mistake it shows

    Process:         iTunes [1622] Path:            /Applications/iTunes.app/Contents/MacOS/iTunes Identifier:      com.apple.iTunes Version:         10.6 (10.6) Build Info:      iTunes-10604001~1 Code Type:       X86-64 (Native) Parent Process:  launchd

  • Trouble with SWF files in Keynote 3

    I am working in Keynote for the first time and having trouble bringing in a .swf file. I am having to use a Windows XP box to build the flash file and then moving them over to a Mac to drop into Keynote. I have Keynote 3 and have QuickTime Version 7.

  • LMS 4.0.1 user tracking issue

    Hi All, I have an interesting problem at one of my customers. They are using LMS 4.0.1, but they have a problem with user tracking with SNMPv3. They using a very simple SNMP configuration, wich is the following: access-list 80 permit x.x.x.x snmp-ser