LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2010, 08:14 AM   #1
rajesh0013
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
Question mail , on file increasing in a directory


Using a shell script....In a particular directory if we are adding one or more files i should get a mail to my mail id , every time when the new file is added i should get the mail.Using crontab so that it will execute automatically wen any new files are added.
 
Old 02-16-2010, 09:42 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by rajesh0013 View Post
Using a shell script....In a particular directory if we are adding one or more files i should get a mail to my mail id , every time when the new file is added i should get the mail.Using crontab so that it will execute automatically wen any new files are added.
Ok...is there a question in here somewhere??

Is this what you WANT to do, or what you're TRYING to do? If you're wanting to do this, the answer is yes, you can. If you're trying to do it, post the code you've written so far, and where it's failing, and we can help you.

Post relevant details, like version/distro of Linux, how often you want it to check, etc., and what error(s) you're having in your script. Otherwise, there are many bash scripting tutorials you can find on Google, that you can use to write this. We are not going to write a script for you, but will be glad to help if you're having a problem.
 
Old 02-16-2010, 07:29 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Quote:
dnotify - Execute a command when the contents of a directory change
http://linux.die.net/man/1/dnotify
 
Old 02-22-2010, 06:17 AM   #4
rajesh0013
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Smile Thank u

Quote:
Originally Posted by chrism01 View Post
Thanks for ur help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increasing my /home directory using LVM Nagglfar Linux - General 3 07-15-2009 02:01 PM
Increasing File Descriptors Geoffrey_Firmin Slackware 5 04-21-2008 09:48 AM
Postfix No such file or directory error on receiving mail jimieee Linux - Software 1 03-26-2004 06:25 AM
open webmail error "Can't create your user directory! 7/mail (No such file or directo ko_zlynn Linux - Networking 1 12-21-2003 04:00 AM
/etc/mail/sendmail.cf: line 0: cannot open: No such file or directory l_9_l Linux - General 2 02-10-2002 07:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration