Truncating the first 100MB of a file in linux

后端 未结 8 2109
余生分开走
余生分开走 2020-12-13 10:11

I am referring to How can you concatenate two huge files with very little spare disk space?

I\'m in the midst of implementing the following:

  1. Allocate a
8条回答
  •  春和景丽
    2020-12-13 10:55

    If you can work with ASCII lines and not bytes, then removing the first n lines of a file is easy. For example to remove the first 100 lines:

    sed -i 1,100d /path/to/file
    

提交回复
热议问题