3 ms·
tail -c +17
by advisedwang 10y ago
tail -c +17
- Jtsummers 10y agoTo expand, `-c` tells tail to start on the nth (starts counting at 1) byte. So +1 starts at the beginning, +17 starts after the first 16 bytes. `-n` is lines, `b` is 512-byte blocks.
- to3m 10y agoThis nearly tells you all you need to know. The other bit of info you'll want to note is that head -c +N produces as many bytes as you ask. So if you try to get the prefix using "head -c +N" and the suffix using "tail -c +N" then you'll have 1 byte of overlap. (dd's corresponding options do not suffer from this problem.)
- xelxebar 10y agoThat seems pretty intuitive to me: Grab the first N bytes vs. grab everything starting from the Nth byte.