BSD::Getfsent - Get file system descriptor file entry
use BSD::Getfsent qw(getfsent); while (@entry = getfsent()) { print "@entry\n"; }
In list context, each file system entry is returned (getfsent() continuously reads the next line of the /etc/fstab file).
getfsent()
The list returned is structured as follows:
$entry[0] # block special device name $entry[1] # file system path prefix $entry[2] # type of file system $entry[3] # comma separated mount options $entry[4] # rw, ro, sw, or xx $entry[5] # dump frequency, in days $entry[6] # pass number on parallel fsck
In scalar context, total of entries is returned.
/etc/fstab
getfsent() is exportable.
BSD::Getfsent was, as it name suggests, developed for BSD-like systems. It may be nevertheless suitable for other UNIX-like systems, including Linux, but remains untested. Bear in mind, that tests will fail if no /etc/fstab can be found (in order that testing on systems like Windows, where no /etc/fstab exists, doesn't result in a false positive).
BSD::Getfsent
fstab(5), getfsent(3)
Steven Schubiger <schubiger@cpan.org>
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install BSD::Getfsent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BSD::Getfsent
CPAN shell
perl -MCPAN -e shell install BSD::Getfsent
For more information on module installation, please visit the detailed CPAN module installation guide.