GNU find – search for files in a directory hierarchy

print each file’s last modification time (%T+) and its name (%P):

$ find . -type f -printf '%T+ %P\n'

Because the time stamp is printed first and also in a suitable way, this is what we use to sort the files within a directory by their last modification time.

This site uses Akismet to reduce spam. Learn how your comment data is processed.