0

How to get major/minor numbers for raw devices

#!/usr/bin/env perl
while (<>) {
/^s*#/ and next;
/(S+)s+(d+)s+(d+)/ and do {
($rawname, $major, $minor) = ($1, $2, $3);
$syspath = qx!find /sys/block -name dev | xargs grep -l "^$major:$minor$" !;

jlim0930

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.