[Klug-general] sorting file listings for comparison

james morris jwm.art.net at gmail.com
Fri May 3 20:37:36 UTC 2013


Found the answer on stackoverflow after some alternative search terms:
http://stackoverflow.com/a/8895544/191492

find . | LANG=C sort -f > ../filelisting

james.


On 3 May 2013 19:33, james morris <jwm.art.net at gmail.com> wrote:
> I'm trying to perform a sort on two different servers and then do a
> diff of the results to make sure have been missed by my
> should-have-used-xxxxx-instead approach.
>
> I've piped the output of find to sort, but haven't managed to get
> identical sort behaviour on the two systems (debian, fedora).
>
> I've added -f to ignore case, but none of the other options really
> make much sense - many of the specify to ignore characters rather than
> sort them. I guess ultimately it has something to do with character
> encodings, but I just want the most common characters treated the same
> on both systems (ie, slashes, spaces, punctuation, etc).
>
> Any ideas?
>
> James.



More information about the Kent mailing list