shell 按字节读取文件

#建立一个存放偏移量的文件 touch readfile #读取偏移量文件记录的偏移量 a=`cat readfile` echo $a #把偏移量赋给skip变量,用来跳过该偏移量记录位置以前的内容 skip=$a #从上一次读取的地方开始复制到newfile2,(跳过上一次的字节,就是此次的开始) dd if=file of=newfile2 bs=1 skip=$skip #获取新增长内容的
相关文章
相关标签/搜索