I wanted a list of files under a directory in name order to pass to an image viewer.
I am using
find $PHOTODIR -iname "*.jpg". Unfortunately this produces the images out of order.
On a USB key (formatted FAT32) I could understand files are processed in the order of directory entries, so I copied to a Ext4 drive, which I thought would produce files in name order, but there are still problems; I guess they are in inode order.
ls lists in order, but I need relative paths.
Can anyone suggest a suitable script?