Tuesday, January 2, 2024

Printing all files in subdirectories sorted by date

On Linux:

find -printf "%TY-%Tm-%Td %TT %p\n" | sort -n

will show sorted by modification date all the files under the working directory. You can replace the %T parts with %A for access time sorting or with %C for creation time sorting.

The command may partially fail if you have filenames with weird unprintable characters.

No comments:

Post a Comment

Popular Posts