CmdID

CmdID / Commands

blockdev

Call ioctl(s) on each listed block device toybox

On Linux

Opens CmdID with your command. It is read in your browser and sent nowhere.

Linux

from the toybox, 0BSD
blockdev --OPTION... BLOCKDEV...
Show 13 options
--setroSet read only
--setrwSet read write
--getroGet read only
--getssGet sector size
--getbszGet block size
--setbsz BYTESSet block size
--getszGet device size in 512-byte sectors
--getsizeGet device size in sectors (deprecated)
--getsize64Get device size in bytes
--getraGet readahead in 512-byte sectors
--setra SECTORSSet readahead
--flushbufsFlush buffers
--rereadptReread partition table

Manage, query, and manipulate block devices.

Print a report for all devices

sudo blockdev --reportIdentify

Print a report for a specific device

sudo blockdev --report /dev/sdXYIdentify

Get the size of a device in 512-byte sectors

sudo blockdev --getsz /dev/sdXYIdentify
--getszGet device size in 512-byte sectors toybox

Set read-only

sudo blockdev --setro /dev/sdXYIdentify
--setroSet read only toybox

Set read-write

sudo blockdev --setrw /dev/sdXYIdentify
--setrwSet read write toybox

Flush buffers

sudo blockdev --flushbufs /dev/sdXYIdentify
--flushbufsFlush buffers toybox

Get the physical block size

sudo blockdev --getpbsz /dev/sdXYIdentify

Set the read-ahead value to 128 sectors

sudo blockdev --setra 128 /dev/sdXYIdentify
--setraSet readahead toybox