Udev::FFI::Device
use Udev::FFI; my $udev = Udev::FFI->new() or die("Can't create Udev::FFI object: $@"); my $device = $udev->new_device_from_subsystem_sysname('block', 'sda1'); if (defined($device)) { print "SYSPATH: ".$device->get_syspath()."\n"; if (my $fs = $device->get_property_value('ID_FS_TYPE')) { print "FS: $fs\n"; } if (my $uuid = $device->get_property_value('ID_FS_UUID')) { print "UUID: $uuid\n"; } }
Udev::FFI main Udev::FFI documentation
To install Udev::FFI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Udev::FFI
CPAN shell
perl -MCPAN -e shell install Udev::FFI
For more information on module installation, please visit the detailed CPAN module installation guide.