Friday, June 12, 2009

Log rotation in Unix

put this code in loopforever.sh:

while [ true ]
do
echo ciao
sleep 1
done


then run loopforever.sh > loop.log

in another shell do
echo > loop.log

if everything works well, the first process can keep writing to the loop.log file...

No comments: