How to Reset milli() function?

I'm weak on unix, but is there an easy way to have the serial data echo to the terminal and also get logged to a file?