Article 4SKZ6 Need help to create a script

Need help to create a script

by
subby80
from LinuxQuestions.org on (#4SKZ6)
Hi,
I need to create a small script which i want to run every night to check if a file is created in a certain directory. If a file is created i need an email message to warn me about it.

I can find the file like this

# find folder -mtime 0 -name "test*" | mail -s 'test' mailadress

But this also sends a message without body. I only want a mail if a file exists.

Thankslatest?d=yIl2AUoC8zA latest?i=Ap97oMb9JvU:hWHwHfws83I:F7zBnMy latest?i=Ap97oMb9JvU:hWHwHfws83I:V_sGLiP latest?d=qj6IDK7rITs latest?i=Ap97oMb9JvU:hWHwHfws83I:gIN9vFwAp97oMb9JvU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments