Thread unix major number ermitteln (7 answers)
Opened by bora99 at 2011-08-30 18:07

Dubu
 2011-08-30 23:21
#151969 #151969
User since
2003-08-04
2145 Artikel
ModeratorIn + EditorIn

user image
Code (perl): (dl )
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

View full thread unix major number ermitteln