문제

I am looking for a solution, to limit the size of the file, when redirecting console output to a logfile.

Is there any existing solution?

REM limit logfile.txt to x MB
command > logfile.txt
도움이 되었습니까?

해결책

I know this is too late, but i hope that it may help someone else

What i did is after executing my main command and if it was a success i execute a script to check the log file size ...

This can be achieved using

&& execute_your_filzsize_limit_check_script_or_program

for exemple

command > logfile.txt && filesize_check.exe
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top