*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: blkdiscard | Section: 8 | Source: NetBSD | File: blkdiscard.8
BLKDISCARD(8) FreeBSD System Manager's Manual BLKDISCARD(8) NAME blkdiscard - tool to discard portions of a device or file SYNOPSIS blkdiscard [-h] [-l length] [-p chunksize] [-n] [-o firstbyte] [-R] [-s] [-V] [-v] [-z] file fdiscard [-f firstbyte] [-h] [-l length] [-m chunksize] [-n] [-R] [-s] [-V] [-v] [-z] file DESCRIPTION The blkdiscard program can be used to discard portions of storage, and works on either device files directly or upon files inside of a mounted file-system. It provides access to the fdiscard(2) system call, and relies upon the backing device to have support in both the blkdiscard driver and in the hardware itself. The fdiscard interface defaults to the "no-run" mode and requires the -R option to perform any actions. OPTIONS Available options: -f firstbyte Set the first byte to be discarded. The default is 0. -h Display built-in help. -l length Limit the length to be discarded. The default is the full device or file size, or the rest of the device or file when the start offset has been set. -m chunksize Set the per-operation chunksize. The default is 32 MiB. -n Set the "no-run" option, and do not actually call fdiscard(2), secure erase, or write zeroes to the file. -o firstbyte This flag is an alias for the -f flag. -p chunksize This flag is an alias for the -m flag. -R Turn off the "no-run mode." -s Use secure erase operation. This requires specific hardware support and is not currently supported. -V Display the program version and exit. -v Set the verbose flag. -z Write zeroes instead of calling fdiscard(2). EXAMPLES To have a dry-run cleaning of any particular file or device: # blkdiscard -n -v filename # blkdiscard -n -v /dev/rwd0b To discard all the blocks on a swap device: # blkdiscard -v /dev/rwd0b To discard all but the first 256MiB of a device, using 128MiB increments: # blkdiscard -v -f 256m -m 128m /dev/rwd0c To zero out the contents of a file or device: # blkdiscard -v -z filename # blkdiscard -v -z /dev/device SEE ALSO fdiscard(2) HISTORY The blkdiscard command first appeared linux-util. This implementation was originally called fdiscard-stuff and has been converted to be blkdiscard(8) compatible and appeared in NetBSD 10.0. AUTHORS The blkdiscard command was written by Matthew R. Green <[email protected]>. BUGS The secure erase functionality of the -s option is not yet implemented. FreeBSD 14.1-RELEASE-p8 January 13, 2024 FreeBSD 14.1-RELEASE-p8

Navigation Options