How to find files older than N days from a given timestamp

Posted by JGeZau on Stack Overflow See other posts from Stack Overflow or by JGeZau
Published on 2012-06-28T15:29:57Z Indexed on 2012/06/30 3:16 UTC
Read the original article Hit count: 98

Filed under:
|
|
|
|

I want to find files older than N days from a given timestamp in format YYYYMMDDHH

I can find file older than 2 days with the below command, but this finds files with present time

find /path/to/dir -mtime -2 -type f -ls

Lets say I give the input timeSamp=2011093009 so I want to find files older than 2 days from 2011093009

Been doing my research, but can't seem to figure it out.

========================================== Found the solution...see below for my Answer..

Thanks

© Stack Overflow or respective owner

Related posts about shell

Related posts about unix