scan direcotries

Hi

I am new to this forum, and glad to be a part of it here after. I have an intersting issue for which I need suggestions of you great minds.

I am in process a building a shell script which should scan a directory for a specified amount of time and prepare a list of all the files that were created in that time.

lets say at the fist scan of 100 sec, there were three files created in $HOME/mydir/

it should prepare a file with this list: some thing like below.
test1.dat
test2.dat
test3.dat

At the second run of the script, lets say 5 more files are created then it should update the previous file list with these latest 5 files (excluding the last three): some thing like below.
test4.dat
test5.dat
test6.dat
test7.dat
test8.dat

File naming conventions can be any thing, but the extension of all the files would be the same.

Any Ideas let me know: email id removed

Thanks
Nag

Welcome to the forum ! :slight_smile:

Please read the rules of the forum !

Personal contact ids should not be posted in the posts.

Regarding your question
####

read the directory list first time - 
populate it in a file - fileA
after n secs
read the directory list again -
populate it in a file - tmp
find the diff of fileA and tmp 
and populate the diff to file A again
and repeat the process based on the interval 'n' seconds