1
Reply

How would you truncate large growing file to 100 Mb file size only and how would you keep such files just for last 3 days in Linux?

Sanjay Dixit

Sanjay Dixit

Dec 16, 2013
794
0

    I use to commends: find /path/to/files* -mtime +3 -exec rm {} \; truncate -s 100 MB /path/to/files*

    Mono Log
    January 05, 2017
    0