How to Show Files from Last 2 Days on Mounted NTFS System

bashcommand linefind

What's exactly the command to show files younger than 2 days? I thought about something like this:

$ find / -mtime -2

…but I'm not sure how to print the date of the found files. My target is to find file on a mounted ntfs system which are new or changed within the last days.

Moreover it would be very helpful to sort the results from the newst to the oldest. Is that possible?

Best Answer

Files created or modified less than 48 hours ago
sorted from the newest to the oldest:

find / -mtime -2 -printf "%T@" -ls | sort

I have found %T@ from man find: last modification time (seconds since epoch)

Related Question