I could not find a simple and free application to rotate log files on Windows. So, I used Linux to rotate log files on my Windows machine.
1. Configure the Windows Folder which has the log files, for sharing
2. Enable Read/Write Permissions
3. Mount the Windows Folder on Linux. Check out my post on how to Share Windows files with Linux - Share Windows Files with Linux
4. Now, create a file in /etc/logrotate.d to do the rotation.
In the below config, I am rotating the log files daily and saving the previous five copies
root@localhost# more /etc/logrotate.d/winfiles
/mnt/win/files.txt {
daily
rotate 5
missingok
compress
}
1. Configure the Windows Folder which has the log files, for sharing
2. Enable Read/Write Permissions
3. Mount the Windows Folder on Linux. Check out my post on how to Share Windows files with Linux - Share Windows Files with Linux
4. Now, create a file in /etc/logrotate.d to do the rotation.
In the below config, I am rotating the log files daily and saving the previous five copies
root@localhost# more /etc/logrotate.d/winfiles
/mnt/win/files.txt {
daily
rotate 5
missingok
compress
}