How do I copy a device in Linux?

Đức Linh

New member
How do I copy a device in Linux?
Answer
To create a device file,
use the mknod(2) syscall. The struct stat structure will give you the major and minor device numbers for an existing device in st_rdev . Having said that, there is little value in “copying” a device because a device doesn’t contain anything useful.
 

Tìm kiếm

Back
Top