1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 00:42:08 +02:00

blockdev: add page (#13922)

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
This commit is contained in:
Lakshyajeet Singh Goyal 2024-10-05 22:17:48 +05:30 committed by GitHub
parent 70d2c92ac0
commit addd219a0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

36
pages/linux/blockdev.md Normal file
View file

@ -0,0 +1,36 @@
# blockdev
> Manage, query, and manipulate block devices.
> More information: <https://manned.org/blockdev>.
- Print a report for all devices:
`sudo blockdev --report`
- Print a report for a specific device:
`sudo blockdev --report {{/dev/sdXY}}`
- Get the size of a device in 512-byte sectors:
`sudo blockdev --getsz {{/dev/sdXY}}`
- Set read-only:
`sudo blockdev --setro {{/dev/sdXY}}`
- Set read-write:
`sudo blockdev --setrw {{/dev/sdXY}}`
- Flush buffers:
`sudo blockdev --flushbufs {{/dev/sdXY}}`
- Get the physical block size:
`sudo blockdev --getpbsz {{/dev/sdXY}}`
- Set the read-ahead value to 128 sectors:
`sudo blockdev --setra 128 {{/dev/sdXY}}`