Help in a simple shell script

Discussion in 'Programming' started by abcvps, Aug 25, 2008.

  1. #1
    I got a problem with my server.... whmreseller is creating problem on my server, as its creating lods of core dumps because of dome getip functions.

    I need a shell script to be made which removes that core.* files from my server from the current directory and sends me the mail that core files are found with the file names..

    I tried it but it dosent works..

    Can any one help me in this ?
    i need to run that script through a cron job every 20 minutes...
     
    abcvps, Aug 25, 2008 IP
  2. azlanhussain

    azlanhussain Active Member

    Messages:
    640
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #2
    For this type of job I normally create a perl daemon and then execute it through cron. If you have Perl compiler installed it won't be hard to do.
     
    azlanhussain, Aug 25, 2008 IP
  3. Murphy Analyzer

    Murphy Analyzer Banned

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah, Perl daemon is the best solution I can imagine
     
    Murphy Analyzer, Aug 26, 2008 IP
  4. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #4
    In case you are creating a daemon, then you dont have to put it into cron, if you are creating a mere script, you gotta put that into cron.
    use unlink function to delete the files in perl script.
     
    maestria, Aug 27, 2008 IP