User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 456,452 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,607 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 553 | Replies: 6
Reply
Join Date: Dec 2007
Posts: 4
Reputation: tmonaghan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tmonaghan tmonaghan is offline Offline
Newbie Poster

Help Can this be done?

  #1  
Dec 5th, 2007
I have a Linux web server that will have a flash form to process user information. This creates a text file in a directory outside of the public area using the date and time for the filename.

What I need is this, whenever a file is created in that directory the system should send me an email notification. I don't need the contents of the file or the file as an attachment, just a notice.

Seems simple enough but I don't have a clue where to start, any help would really be appreciated.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Location: Israel
Posts: 1,636
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Rep Power: 6
Solved Threads: 72
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Can this be done?

  #2  
Dec 5th, 2007
why not add that function to the script that creates the actual file?
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote  
Join Date: Dec 2007
Posts: 4
Reputation: tmonaghan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tmonaghan tmonaghan is offline Offline
Newbie Poster

Re: Can this be done?

  #3  
Dec 5th, 2007
Yes, I could add that to the form. I thought such a script would be useful for other tasks as well.
Reply With Quote  
Join Date: Jan 2007
Location: Israel
Posts: 1,636
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Rep Power: 6
Solved Threads: 72
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Can this be done?

  #4  
Dec 5th, 2007
a script that watches a directory for changes? too many ways of implementing that
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote  
Join Date: Dec 2007
Posts: 4
Reputation: tmonaghan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tmonaghan tmonaghan is offline Offline
Newbie Poster

Re: Can this be done?

  #5  
Dec 5th, 2007
Just one way would do. Any ideas where I could find such a script?
Reply With Quote  
Join Date: Jan 2007
Location: Israel
Posts: 1,636
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Rep Power: 6
Solved Threads: 72
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Can this be done?

  #6  
Dec 5th, 2007
you can write it. simple script to ls /dir/dir >logfile.log in cron to run every once in a while
let the script compare the previous logfile to the one created now. if different - send notification
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote  
Join Date: Dec 2007
Posts: 4
Reputation: tmonaghan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tmonaghan tmonaghan is offline Offline
Newbie Poster

Re: Can this be done?

  #7  
Dec 5th, 2007
Sounds good, thanks!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 2:01 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC