Linux combine sort files by date created and given file name

linux, shell, sorting

Solution

find . -name "filename" -printf '%TY:%Tm:%Td %TH:%TM %h/%f\n' | sort

Forget xargs. "Find" and "sort" are all the tools you need.

Problem

I need to combine these to commands in order to have a sorted list by date created with the specified "filename". I know that sorting files by date can be achieved with: ls -lrt and finding a file by name with find . -name "filename*" I don't know how to combine these two. I tried with a pipeline but I don't get the right result. [EDIT] Not sorted

Original source