query for a file created at a particular time

Hi guys

I need to find out a file created at 'x' time and the name of the file is rag.rxt

100's of these files are created every minute and i dont know how to find the file created at a particular time. pls help me with the command to search that.

thanks in advance

It seems a bit odd, but you can use the find(1) command with two -newer expressions. In short, you create two "range" files using touch(1) then search for the files modified between them. For example, say you're searching for one or more files modified between 11:55 pm and midnight on Januray 20th of this year:

touch -m -t 200701202355.00 /tmp/lower
touch -m -t 200701202359.59 /tmp/upper
find . -type f -newer /tmp/lower ! -newer /tmp/upper

Note, this range works only on a file's MODIFIED time (mtime) not its last access time (atime) or status change (ctime). You can add additional expressions to refine your search. I hope this helps.

thanks a lot for your reply. i did help me identify the files.