One - One Code All

Blog Content

linux不打开文件删除文件的前n行

Linux-Mac   2017-09-09 17:36:40

linux不打开文件删除文件行,删除文件前n行。


通过tail/head命令,将文件尾部/头部的n行数据重定向到新的文件中。


tail -n +3 old_file > new_file

mv new_file old_file



上一篇:量化科技2017年上半年营收70万元 业绩亏损325万元
下一篇:python格式化字符串f-string

The minute you think of giving up, think of the reason why you held on so long.