Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Can't find a file manager that sorts hex-numbered files

  1. #1
    Join Date
    May 2008
    Location
    México
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Can't find a file manager that sorts hex-numbered files

    I have some files, named E000.svg, E001.svg, E002.svg, ... E07D.svg, E07E.svg, E07F.svg . When I open them in Nautilus, and choose the option Sort Alphabetically, they are sorted:

    E000.svg
    E00A.svg
    E00B.svg
    E00C.svg
    E00D.svg
    E00E.svg
    E00F.svg
    E001.svg
    E01A.svg
    E01B.svg

    and so on. This is totally useless for me, so I searched for a solution in Google, and found lots of bug reports. It looks like it's a “feature” for sorting 10 after 9; but clearly they have forgotten that many people don't like or don't need that option.

    Thinking it was a Nautilus thing, I installed Thunar, but it has the exact useless algorithm. And then I installed PCManFM, but it's also the same.

    Does anyone have any idea if I can install a file manager that correctly sorts my files? Or will I need to switch to Windows to have it fixed? (not joking here, Windows Explorer doesn't suffer from this feature)

  2. #2
    Join Date
    May 2008
    Location
    México
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't find a file manager that sorts hex-numbered files

    This is driving me crazy. I read on other forum that GNOME Commander wasn't affected by this bug, so I installed it, and it still sorts files the wrong way. I'm believing to think this is an Ubuntu-specific bug, but I have no way to confirm, since I don't have installed another distro.

  3. #3
    Join Date
    Jul 2007
    Location
    Burlington, NC
    Beans
    1,995
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't find a file manager that sorts hex-numbered files

    That is interesting.

    I've done some testing and noticed that for nautilus, the problem
    goes away if the name is all spaced out. Here's my testing routine,
    you can use the for loop at the end for a workaround:
    Code:
    mkdir test
    cd test
    touch E0{0,1}{{0..9},{A..F}}.txt
    #look in nautilus, screen1
    for file in *.*
    do
        ext="${file##*.}"
        new="$( echo "${file%.*}" | sed 's/./& /g' )"
        mv -iv "$file" "$new.$ext"
    done
    #look in nautilus, screen2
    Attached Images Attached Images
    Give me Free Software or Give me Death!

  4. #4
    Join Date
    May 2008
    Location
    México
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't find a file manager that sorts hex-numbered files

    (duplicate post)
    Last edited by R2D2!; February 6th, 2011 at 07:31 AM. Reason: (duplicate post)

  5. #5
    Join Date
    May 2008
    Location
    México
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't find a file manager that sorts hex-numbered files

    Well, that's a dirty fix, and it can cause me problems with my scripts (because of the spaces).

    What I really want to know is if this “feature” is Ubuntu-specific, or Gnome-specific, or that those all file managers (so far: Nautilus, Thunar, PCManFM, Gnome Commander) implement it independently.

  6. #6
    Join Date
    Jul 2007
    Location
    Burlington, NC
    Beans
    1,995
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't find a file manager that sorts hex-numbered files

    Quote Originally Posted by R2D2! View Post
    Well, that's a dirty fix,
    Not perfect; but not "dirty" either.

    Quote Originally Posted by R2D2! View Post
    it can cause me problems with my scripts (because of the spaces).
    If that's the case, you definitely need to tighten up your scripts.
    Finding fault with nautilus sorting but knowing that the spaces will
    break your scripts is a pot and kettle situation, don't you think?

    Quote Originally Posted by R2D2! View Post
    What I really want to know is if this “feature” is Ubuntu-specific, or Gnome-specific, or that those all file managers (so far: Nautilus, Thunar, PCManFM, Gnome Commander) implement it independently.
    I tested this on an aging Fedora box(version 12) - it's the same way.

    Here's another dingy () workaround without spaces,
    translate the names to decimal!:
    Code:
    for file in E0??.txt
    do
        mv -iv "$file" "$(( 0x${file%.txt} )).txt"
    done
    #sample output
    `E007.txt' -> `57351.txt'
    `E008.txt' -> `57352.txt'
    `E009.txt' -> `57353.txt'
    `E00A.txt' -> `57354.txt'
    `E00B.txt' -> `57355.txt'
    `E00C.txt' -> `57356.txt'
    `E00D.txt' -> `57357.txt'
    `E00E.txt' -> `57358.txt'
    Give me Free Software or Give me Death!

  7. #7
    Join Date
    May 2008
    Location
    México
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't find a file manager that sorts hex-numbered files

    (duplicate post)
    Last edited by R2D2!; February 6th, 2011 at 07:31 AM. Reason: (duplicate post)

  8. #8
    Join Date
    May 2008
    Location
    México
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't find a file manager that sorts hex-numbered files

    I don't want to sound rude, but none of your solutions addresses the REAL problem: the “smart” sorting algorithm. Of course I can change the name of my files (and fix my scripts), but what would happen when I'm checking somebody else's files (for example, via SAMBA or FTP)? If I don't have permissions on the files, then any of those solutions become useless.

    P.S. I won't use decimal. Nobody uses decimal for Unicode (those files are glyphs for a font I'm working on).

  9. #9
    Join Date
    Apr 2010
    Location
    PNW on E-side Cascades
    Beans
    363
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't find a file manager that sorts hex-numbered files

    Learn PERL and write your own script!

    Start looking
    Nonsense is an assertion of man's spiritual freedom in spite of all the oppressions of circumstance-- Aldous Huxley
    The real power of Linux lies in the command line

  10. #10
    Join Date
    May 2008
    Location
    México
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't find a file manager that sorts hex-numbered files

    Do you want me to write a new file manager from scratch?? That would take me months, if not years. It's easier to fix a bug from an existing program than writing a new one.

Page 1 of 2 12 LastLast

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
  •