Read last line from file

后端 未结 12 1748
南方客
南方客 2020-12-01 09:13

I\'ve been bumping into a problem. I have a log on a Linux box in which is written the output from several running processes. This file can get really big sometimes and I ne

12条回答
  •  悲哀的现实
    2020-12-01 09:59

    You're looking for the fseek function. There are working examples of how to read the last line of a file in the comments section there.

提交回复
热议问题