how to put deletion log into file in append mode in AIX?

0

I want to delete multiple files and record those file name into another file. I am using following command

$find . -name '*.log' -mtime +2 -ls -exec rm {} \;  >deletelog

it is working fine. But the problem is if I run the same command again, It will totally replace the file that I named as deletelog. How to append the log so that I can run the command multiple times, and log will append on the file?

Govinda Thapa

Posted 2019-04-07T07:03:44.943

Reputation: 21

1Replace >deletelog with >>deletelog – DavidPostill – 2019-04-07T12:00:27.430

No answers