سؤال

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