title: Get the count of bytes waiting on a serial port before reading, linux
body: <p>I am converting a Win32 serial class to Linux (Ubuntu) one of the required functions of this serial class is to "peek" at the serial buffer to see how many bytes are waiting on the serial port before reading the serial port. </p>
  
  <p>In this pedicure situation I only need to know if there are ANY bytes on the port before attempting to read it. </p>
  
  <p>In windows I used COMSTATS but I can't seem to find a similar function in Linux. </p>
  
  <p>My question is: </p>
  
  <p>On Linux How do you read the amount of BYTES/chars waiting on a serial port without removing them from the serial port buffer?</p>