Linux command
raw 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Bind
raw /dev/raw/raw1 /dev/block_device
Query
raw /dev/raw/raw1
Query all
raw -qa
说明
raw binds Linux raw character devices to block devices, allowing direct (unbuffered) I/O access to the underlying storage. Raw devices bypass the kernel's buffer cache, providing direct access to block devices for applications that manage their own caching (like databases). When a raw device is bound to a block device, reading and writing to the raw device performs synchronous, direct I/O to the underlying storage without kernel buffering.
参数
- /dev/raw/raw_N_
- Raw device node to bind or query
- -q, --query
- Query binding for specified raw device
- -a, --all
- Query all raw devices (with -q)
FAQ
What is the raw command used for?
raw binds Linux raw character devices to block devices, allowing direct (unbuffered) I/O access to the underlying storage. Raw devices bypass the kernel's buffer cache, providing direct access to block devices for applications that manage their own caching (like databases). When a raw device is bound to a block device, reading and writing to the raw device performs synchronous, direct I/O to the underlying storage without kernel buffering.
How do I run a basic raw example?
Run `raw /dev/raw/raw1 /dev/block_device` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does /dev/raw/raw_N_ do in raw?
Raw device node to bind or query