Use the
find command
Code:
man find # excerpts of -mmin -mtime -type
-mmin n
File's data was last modified n minutes ago.
-mtime n
File's data was last modified n*24 hours ago. See the comments
for -atime to understand how rounding affects the interpretation
of file modification times.
-type c
File is of type c:
b block (buffered) special
c character (unbuffered) special
d directory
p named pipe (FIFO)
f regular file
l symbolic link; this is never true if the -L option or the
-follow option is in effect, unless the symbolic link is
broken. If you want to search for symbolic links when -L
is in effect, use -xtype.
s socket
D door (Solaris)
find operates left to right. If a result is valid for option X AND Y, it'll print it.
Because of this, if a result if valid for greater then 2 days AND less then 5 days, it should show up.
For example,
find -iname \*py -iname m\* will find all files ending in py, then for those results, find files starting with m.
(You could also do m*py but misses the point)