DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: script required to delete 30 days old files in $APPLCSF/tmp

  1. #1
    Join Date
    Nov 2002
    Posts
    115

    script required to delete 30 days old files in $APPLCSF/tmp

    Hi

    Any body is having sciprt to delete old files in $APPLCSF/tmp ?

    If so, pls do send the script


    Thanks in advance
    Prasad

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    tried writing it yourself?

  3. #3
    Join Date
    Nov 2002
    Posts
    115
    Hi

    I am new to write shell script . Can anybody help me ?

    I want to remove files in $APPLCSF/tmp using find command.

    I am able to delete files in $APPLCSF since the PATH is set (/data/p2p/p2pdb80/cm). But, I could not able to delete files in 'tmp' .

    The commands i am using are as follows

    1. find /data/p2p/p2pdb80/cm -mtime +7 -ls -exec rm {} \; 2>*1 | mailx -s "Deleted old APPLCSF files in $LOGNAME" -- its working fine

    2. find $APPLCSF/tmp -mtime +7 -ls -exec rm {} \; 2>*1 | mailx -s "Deleted old APPLCSF files in $LOGNAME" -- not working

    Thanks in Advance
    Prasad

  4. #4
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by prasadvd
    Hi

    I am new to write shell script . Can anybody help me ?

    I want to remove files in $APPLCSF/tmp using find command.

    I am able to delete files in $APPLCSF since the PATH is set (/data/p2p/p2pdb80/cm). But, I could not able to delete files in 'tmp' .

    The commands i am using are as follows

    1. find /data/p2p/p2pdb80/cm -mtime +7 -ls -exec rm {} \; 2>*1 | mailx -s "Deleted old APPLCSF files in $LOGNAME" -- its working fine

    2. find $APPLCSF/tmp -mtime +7 -ls -exec rm {} \; 2>*1 | mailx -s "Deleted old APPLCSF files in $LOGNAME" -- not working

    Thanks in Advance
    Make sure that $APPLCSF is defined correctly in your environment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width