Can someone let me know how to use command line to find files systemwide (from root) that are created within a specific date range?
Many thanks
Can someone let me know how to use command line to find files systemwide (from root) that are created within a specific date range?
Many thanks
If you are in GNU/Linux, something like this should do it, for example:
find / -newerct 20130409 ! -newerct 20140509
In BSD systems you can do something like this for the same effect:
touch -t 201304090000 /tmp/mark.start
touch -t 201405090000 /tmp/mark.end
find / -newer /tmp/mark.start ! -newer /tmp/mark.end
I think this will work in Solaris too but I cannot test it right now.
Would you believe with the find
command?
The standard version of find only supports timestamps relative to some datum - either an existing file or an offset relative to 'now', but if you do want to find files with timestamps explicitly between 2 datums then you can create files with those timestamps using touch, then...
touch -t 20131120000000 /tmp/fromdate
touch -t 20131221000000 /tmp/todate
find / -type f -newer /tmp/fromdate ! -newer /tmp/todate -exec ls -l {}\;