Serial Communication Help

Hi all, I was wondering if anyone could explain to me some things about serial communication. I have zero experience with any form of serial data transfer but my use case for the OpenMV requires me to either use serial over USB, RS-232, or I2C. I initially assumed that serial over USB through the USB_VCP class would be the easiest option, but I can’t find anything on how to read in the data from a virtual serial port on Linux. I am able to just cat > /dev/ttyACM0 but its just a stream of data and I want to only read the last line at any one point. I would appreciate some advice on either how to properly communicate over serial on Linux or a better alternative. Thanks.