I have a cron job that, among other things, does a recursive ls of a directory into a file. This gets compared to another file that I've created that, supposedly, contains an identical listing of the same directory. My problem is that, when I generate the version for comparison, I get the files listed in case-insensitive order. When the cron job runs, its list comes out in case-sensitive order.
How can I get both of these to come out the same way (I don't care which)? My call to ls is
/bin/ls -lR --time-style=long-iso *
; as far as I can tell, LC_COLLATE is not set in either setting.
LC_ALL=C ls ...
?