I am trying to find files that match time=* and then need to display it by sorting it numerically.
The result file names would be :
first/path/time=001.jpg
first/path/time=002.jpg
second/path/time=001.jpg
...
which I want to see as,
first/path/time=001.jpg
second/path/time=001.jpg
first/path/time=002.jpg
...
sorted numerically with respect to the 3 digits on file name.
For now, i tried
find . -name time=* | rev | sort | rev
which does work for single digits but with numbers like 019 021 it does not work.
Full path would be something like,
path/to/folder1/alpha=0.1_beta=0.2_gamma=1.0/time=001.jpg
path/to/folder1/alpha=0.1_beta=0.2_gamma=0.1/time=001.jpg
path/to/folder2/alpha=0.1_beta=0.2_gamma=0.1/time=001.jpg
.
.
.
I think it would be easiest if the files could be sorted using only last 7 characters. 001.jpg 010.jpg... however sadly sort does not support support negative indexing to get last 6 characters :(