head也可以:
head -c 100 file # returns the first 100 bytes in the file
..将提取前100个字节并将其返回。
head为此使用的好处是
tail匹配的语法:
tail -c 100 file # returns the last 100 bytes in the file
您可以将它们组合起来以获得字节范围。例如,要从文件中获取 后 100个字节,请
head使用读取前200个字节,然后使用tail来获取后100个字节:
head -c 200 file | tail -c 100



