Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • only the find part find -newermt "$timestring" -printf '%M@\t%f %Mb %Md %MH:%MM\n' gives me funny output -rwxrwxrwx@ S0002975.LOG -rwxrwxrwxb -rwxrwxrwxd -rwxrwxrwxH:-rwxrwxrwxM Commented Feb 12, 2013 at 1:25
  • @Radek Sorry, it's %T for the mtime, %M is the permissions. Commented Feb 12, 2013 at 1:29
  • Beautiful. Works smoothly. My final code is find /tmp -maxdepth 1 -type f -newermt "20130207 00:38:51" -printf '%T@\t%f-%Tb %Td %TH:%TM\n' | sort -k1n | cut -f 2- I separated file name and time by - because I will capture the output in php and use - as separator. Thank you so much. Commented Feb 12, 2013 at 1:37
  • @Gilles it's awesome, but if you explain timestring , it will help more.. Commented Feb 12, 2013 at 3:37
  • @RahulPatil Done. I also added a more readable bash method. Commented Feb 12, 2013 at 10:32