-
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
-
tried writing it yourself?
-
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|