Professional Web Applications Themes

ls behavior ??? - Linux / Unix Administration

Hello, I have an issue with the way ls displays files in sparc Solaris 8,9,10 On console, ls display order is: Alpha alpha.5 bambi list_05_sclk.tdl alpha alpha_05 Bravo sulley alpha. alpha_1 bravo alpha.05 alpha_5 list_05.tdl If I login remotely via ssh(to the same machine), the ls output is: Alpha alpha.05 alpha_5 list_05_sclk.tdl Bravo alpha.5 bambi sulley alpha alpha_05 bravo alpha. alpha_1 list_05.tdl Any ideas why the output is different? How can I change this so both behave the same? ls is not aliased openssh-3.7.1p1 Thanks for the help!...

  1. #1

    Default ls behavior ???

    Hello,
    I have an issue with the way ls displays files in sparc Solaris 8,9,10

    On console, ls display order is:
    Alpha alpha.5 bambi list_05_sclk.tdl
    alpha alpha_05 Bravo sulley
    alpha. alpha_1 bravo
    alpha.05 alpha_5 list_05.tdl

    If I login remotely via ssh(to the same machine), the ls output is:
    Alpha alpha.05 alpha_5 list_05_sclk.tdl
    Bravo alpha.5 bambi sulley
    alpha alpha_05 bravo
    alpha. alpha_1 list_05.tdl

    Any ideas why the output is different? How can I change this so both
    behave the same?

    ls is not aliased
    openssh-3.7.1p1

    Thanks for the help!
    Mike Guest

  2. #2

    Default Re: ls behavior ???

    On 2006-03-29, Mike wrote: 

    Your locale settings are different. To see what they are, use:

    printf "%s\n" "$LC_COLLATE" "$LC_ALL"

    Then set LC_COLLATE to the value you prefer.

    --
    Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
    Shell Scripting Recipes: | My code in this post, if any,
    A Problem-Solution Approach | is released under the
    2005, Apress | GNU General Public Licence
    Chris Guest

  3. #3

    Default Re: ls behavior ???

    On 2006-03-29, Mike <com> wrote: 

    What is the output of "locale" in both situations?
    Jordan Guest

  4. #4

    Default Re: ls behavior ???

    Thanks!!! I don't think I could have figured that out. How did you know
    to look at that? What is LC_COLLATE for?

    At console; LC_COLLATE = en_US.ISO8859-1

    in the ssh session, LC_COLLATE was not set. Once I set it, the ls
    results were the same. Thanks for the answer!

    Oh, how can I automatically set it for the SSH session ?


    Chris F.A. Johnson wrote: 
    >
    >
    > Your locale settings are different. To see what they are, use:
    >
    > printf "%s\n" "$LC_COLLATE" "$LC_ALL"
    >
    > Then set LC_COLLATE to the value you prefer.
    >[/ref]
    Mike Guest

  5. #5

    Default Re: ls behavior ???

    Mike wrote: 
    I looked it up. Sorry about being lazy. 
    I just added 'setenv LC_COLLATE en...' to .cshrc 
    Thanks again!!! 
    >>
    >>
    >>
    >> Your locale settings are different. To see what they are, use:
    >>
    >> printf "%s\n" "$LC_COLLATE" "$LC_ALL"
    >>
    >> Then set LC_COLLATE to the value you prefer.
    >>[/ref][/ref]
    Mike Guest

  6. #6

    Default Re: ls behavior ???

    Mike wrote: 
    > I just added 'setenv LC_COLLATE en...' to .cshrc[/ref]

    Ooo, an oldie still using csh. I thought I was a dinosaur
    for still using csh after year 2000. I finally left technological
    progress catch me up only a few years ago and have
    been using ksh or bash recently.

    Doug Guest

  7. #7

    Default Re: ls behavior ???

    In article <riFWf.6737$news.prodigy.com>,
    Mike <com> wrote:
     

    "collate" is another word for "sort", and it controls the ordering of
    characters. So any time you notice things that should be alphabetical
    coming out in different orders, it's almost always because you're using
    a different collate setting.

    --
    Barry Margolin, mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***
    Barry Guest

  8. #8

    Default Re: ls behavior ???

    Doug Freyburger wrote: 
    >>
    >>I just added 'setenv LC_COLLATE en...' to .cshrc[/ref]
    >
    >
    > Ooo, an oldie still using csh. I thought I was a dinosaur
    > for still using csh after year 2000. I finally left technological
    > progress catch me up only a few years ago and have
    > been using ksh or bash recently.
    >[/ref]
    Well, not quite that old. I am using tcsh. AFAIK, it is very similar
    to bash (line editing, up arrows).
    Mike Guest

  9. #9

    Default Re: ls behavior ???

    Mike <com> writes:
     

    You're not alone.

    http://www.killfile.org/~tskirvin/uberconfig/csh/

    - Tim Skirvin (org)
    --
    http://www.killfile.org/~tskirvin/ Skirv's Homepage <FISH>< <*>
    http://www.killfile.org/~tskirvin/history/ Skirv's History
    Tim Guest

Similar Threads

  1. What did I do? swf behavior
    By Mary in forum Macromedia Flash
    Replies: 4
    Last Post: May 1st, 08:22 PM
  2. Behavior help
    By adamd_mc webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: October 11th, 09:27 PM
  3. Odd name behavior in OS X
    By William A. T. Clark in forum Mac Portable
    Replies: 2
    Last Post: September 5th, 03:17 PM
  4. UI behavior
    By Arthur in forum ASP.NET General
    Replies: 2
    Last Post: August 23rd, 12:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139