linux删除大文件的前n行
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
linux删除大文件的前n行
在数据挖掘中我们经常会增量更新训练日志,需要删除前n行的过期数据,直接用sed命令比较慢,谷歌了一下,发现有个奇技淫巧:
tail -n +3 old_file > new_file
mv new_file old_file
这样就删除了前2行,速度要比sed命令快




A beautiful web dashboard for Linux
最近提交(Master分支:5 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)