Find files in specific folders

Hi Team,

I am new to the linux commands and I really need help . I would be really thankful if I can get some inputs.

I have below folders in the path " /home/temp "

20170428
20170427
20170429
changes
temp

I need to get the files generated in the last 15 mins in all the above folders except the folder changes and temp or in other way I need to get the files generated in last 15 mins by only looking into the date specific folders .

The command " find "/home/temp" -type f -mmin -15 is looking into all the folders. Is there any way to get what I need ?

Br,
Jack

find "/home/temp/2*" -type f -mmin -15
1 Like

find "/home/temp/2*" is not working.. I get the error as No such file or directory . btw the path is available.

No quotes, the start directory is to be evaluated by the shell.

find /home/temp/[0-9]* -type f -mmin -15

Note this can include yet incomplete files that are just written.

Thanks for the valuable inputs .
:slight_smile:

Yes its working , though I need to take care of the incomplete files, I will check that part.