2011-08-30T16:07:36 bora99dieses modul ist leider nicht installiert.
1 2 3 4 5 6 7 8 9
#!/usr/bin/perl use strict; use warnings; use File::stat; my $st=stat("/dev/null"); printf "major: %d, minor: %d\n", $st->rdev >> 8, $st->rdev & 0xFF; __END__ major: 1, minor: 3
1 2 3 4 5 6 7 8
#!/usr/bin/perl use strict; use warnings; use File::stat; my $file=shift || '/dev/null'; my $st=stat($file) or die "Can not stat $file\n"; printf "major: %x, minor: %x\n", $st->rdev >> 8, $st->rdev & 0xFF;
1 2 3 4 5
$st=stat("/dev/volumegr/group"); printf "%d 0x%06.6x\n", ($st->dev >> 24) & 0xff, $st->rdev & 0xffffff; __END__