Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I have a folder that contains one folder for each month. "January" "February" etc. The problem is they are automatically arranged in alphabetical order. Is there any way I ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4

    Arraging Folders

    Hi,

    I have a folder that contains one folder for each month. "January" "February" etc. The problem is they are automatically arranged in alphabetical order. Is there any way I can change that so the default arrangement can follow the regular order of the months? will that order change if another user accesses that folder?

    Thanx in advance!

  2. #2
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    The only way would be name them:

    01_January
    02_February
    .
    .
    .

  3. #3
    Linux Newbie Geeth's Avatar
    Join Date
    Apr 2008
    Location
    Brisbane Aus
    Posts
    176
    If want want by year as well something like the following may work

    01_08_January
    01_09_January

  4. #4
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,298
    If you want it by year as well then it is better to use year first

    08_01_january
    08_02_february
    ...
    09_01_january
    09_02_february
    ...

    for example...
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  5. #5
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4
    Thanx for the replies!

    I have another problem now. I have one folder for each day of the month. "1" "2" "3" etc. However, it is arranged "1", "10", "11", instead of the normal 1,2,3 order. What can I do now?

    Once again, thanks for your help!

  6. #6
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    The 1,2,3,... have to be 01,02,03,...

  7. #7
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Although the shell and most utilities will sort them, you could get the day names in numerical order by
    Code:
    ls | sort -n

Posting Permissions

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