Linux › Section C · Devices › Topic C.2

The sysfs device path and dd

A name such as /dev/sda says little about the hardware behind it, so the kernel also publishes a detailed map of every device under /sys. And when you need to copy raw data to or from a device, dd does the job byte for byte, which makes it both indispensable and dangerous.

In this topic

  • Why /dev is not enough
  • The layout of /sys
  • Attribute files
  • From a device file to its sysfs path
  • Worked example: a disk's size from sysfs
  • dd: copying raw data
  • More dd options
  • Worked example: cutting and patching a file
  • Using dd on real devices safely
  • Common mistakes to avoid
  • Key takeaways

This topic is part of Wuanberri Pro. Checking your access…

← Previous topicNext topic →