List files in all subdirectories by creation date

filessearchtimestamps

I have forgotten the name of a file which is in a directory or one of its subdirectories. I remember the file's extension (.nb) and know approximately when it was created. How can I list all file with this extension in the current directory and subdirectories along with their creation dates? I'm using Mac OS X.

Best Answer

This should accomplish what you want.

find . -type f -name '*.nb'|xargs stat -f '%c %N'|sort

Explanation

find . -type f -name '*.nb' find all files with .nb extension.

xargs stat -f '%c %N' print out the files with the unix timestamp in the front.

sort sort it.

Related Question