title: to delete files older than 7 days using Unix
body: <p>Requirement:</p>
  
  <p>i am having the path where the files will be present .</p>
  
  <p>i need to get the path from it and delete the files older than 7 days with name as <em>.logo</em> or <em>,out0</em> ..</p>
  
  <p>ISSUE:tried the below but its going to many paths that were not listed..</p>
  
  <pre><code> #reading source path from rem_logs.txt
  
  cat rem_logs.txt | while read FILE_PATH
   do
     echo " Path obtained from rem_logs.txt --&gt; '$FILE_PATH'"
  
  
     echo "File has to be removed from '$FILE_PATH'"
  
     #moving to the specified path above
          find  $FILE_PATH -type f -mtime +7 -print | while read FILE_NAME
  
     echo "File is '$FILE_NAME'"
        do
            chmod 777 $FILE_NAME
  
  
           echo "$FILE_NAME is received"
                if [ "$FILE_NAME"=*.log0* -o "$FILE_NAME"=*.out0*] 
                   then 
                       echo " $FILE_PATH/$FILE_NAME" &gt; $LOGPATH/abdul.txt
  </code></pre>
  
  <h1>used above statement for testing in testing environment</h1>
  
  <pre><code>                 else 
                       echo "This file - $FILE_NAME need not be removed"
                fi
          done
          UpdateLog_del.sh "$FILE_NAME is presently deleted from the above mentioned path"   
  
  done
  </code></pre>