nbdkit-offset-filter(1)
π nbdkit-offset-filter(1) π
okay bestie, so this is the nbdkit-offset-filter page β it lives in section 1 of the NBDKIT manual, and it's genuinely one of the cutest little filters in the whole fam. let's get into it β¨
πΈ NAME πΈ
nbdkit-offset-filter β the nbdkit offset filter. that's it, that's the name, she's simple and she serves π
β¨ SYNOPSIS β¨
nbdkit --filter=offset plugin offset=OFFSET range=LENGTH [plugin-args...]
π¦ DESCRIPTION π¦
nbdkit-offset-filter is a filter that limits requests to the byte range [offset .. offset+range-1] inside some other plugin. so likeβ¦ it's a little window. a crop. a slice of the pie π you pick where it starts and how much you want, and everything outside that range is simply not invited to the party.
no cap, that's the whole vibe.
π PARAMETERS π
offset=OFFSETβ the start offset. and listen, the offset must be β₯ 0, we do not do negative offsets here, bestie π
this one's optional! if you don't hand it over, offset=0 is assumed. very demure, very default.
range=LENGTHβ the length of data to serve. how much you're getting, essentially.
also optional!! if you don't give it, the range gets served starting from the offset all the way through to the end of the underlying file/device. so like, from there to the finish line π
π¨ okay important: it is an error if the offset and/or range specify data that lies beyond the end of the underlying device. that's a whole problem. if you need to truncate or extend the size of plugins, go talk to nbdkit-truncate-filter(1) instead, she handles that.
π EXAMPLES π
π Serve part of a file
using nbdkit-file-plugin(1), you can serve the file disk.img starting at offset 1M. the total length served is 100M β which means, lowkey, the underlying file has to be at least 101M in length:
nbdkit --filter=offset file disk.img offset=1M range=100M
π Serve a single partition
an easier way to do this is with nbdkit-partition-filter(1), just saying.
but one way to serve a single partition off a disk is to find the start and length of the partition, like with this:
$ parted disk.img -- unit b print
...
Number Start End Size Type File system Flags
1 65536B 104792575B 104727040B primary ext2
and then you serve the partition only, like:
nbdkit --filter=offset file disk.img offset=65536 range=104727040
ate. no crumbs. π₯
π§ FILES π§
$filterdir/nbdkit-offset-filter.soβ the filter itself, the main character π
use nbdkit --dump-config to find where $filterdir is hiding.
β VERSION β
nbdkit-offset-filter first appeared in nbdkit 1.2. a legend from the start, fr fr.
π SEE ALSO π
nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3), nbdkit-map-filter(1), nbdkit-partition-filter(1), nbdkit-protect-filter(1), nbdkit-tar-filter(1), nbdkit-truncate-filter(1).
iykyk β go read them, they're all icons π«Ά
πΈ AUTHORS πΈ
- Eric Blake
- Richard W.M. Jones
the girls that built it. we stan ππ
π COPYRIGHT π
Copyright Red Hat
π LICENSE π
redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
okay that's the whole page bestie, and yes the legal bits are the legal bits, I'm not touching those π
and that's a wrap! this little love letter to the offset filter came to you from nbdkit-1.48.1, dated 2026-08-29. go crop something gorgeous πβ¨πΈπ¦
π¦ where this page comes from
- fedora 44: nbdkit-basic-filters 1.48.1-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms