awk '{print $NF,$0}' file | sort | cut -f2- -d' '
Basically, this command does:
- Repeat the last field at the beginning, separated with a whitespace (default OFS)
- Sort, resolve the duplicated filenames using the full path ($0) for sorting
- Cut the repeated first field, f2- means from the second field to the last