title: UNIX - list all existing serial ports
body: <p>I'm writing a C program that's automatically logging in to some connected Linux device (via Serial Port) and reading all of its logfiles etc.<br>
  So here's the problem: I don't want to hardcode the serial port (in my case /dev/ttyS0 ) into my code, but give some kind of prompt at the beginning, listing all <strong><em>physically existing</em></strong> devices from which I can choose from and pass it as a parameter.<br>
  Is there a way to distinguish between logical and physical devices in the /dev folder? I don't want to use ls in the /dev folder and have all the (in my case) unnecessary information displayed; I only want the actually existing serial ports to be shown.</p>