I have a log file recieveing msgs of up to 8k bytes. I would like those messages to be smaller. I am currently tailing the log file with tail -c +1 -F
however this grabs the entire 8k message which is to big. I would like to do something like tail -c 2048 -F
however I don't want to lose and text from the msgs. Will tail -c 1024 -F
cause me to lose some of the msg if the msg is over 1024 bytes?
Additional Info: I am calling the tail command from python with and my regex filtering lags if the message is too large.
for line in sh.tail("-c", "4096", "-F", path, _iter=True):
# Doing some regex filtering here