需求: linux下获取某文件的总行数 实现: 方案一: echo `cat logfile.txt | wc -l 方案二: more logfile.txt |wc -l 原文链接:http://www.xhuojia.com/zhuanlan/2779749052.html