The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-26-2007
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
Quote:
Originally Posted by logic0
output of /tmp/log is like
./access.log
./logs/access.log

in command i see using

while read file

file is the /tmp/log ?
Replace dot by actual path

Code:
find <path_to_directory> -size +1000000 -exec ls -l {} \; > /tmp/logs


Code:
dt=$( date +%Y%M%d )
while read file
do
    cp ${file} "${file}_${dt}"
    : > ${file}
done < /tmp/logs