Filesys::Ext2 - Interface to ext2 and ext3 filesystem attributes
use Filesys::Ext2 qw(:all); eval { $mode = lsattr("/etc/passwd"); } eval { chattr("+aud", "/etc/passwd"); } #or equivalently #chattr($mode|0x0062, "/etc/passwd");
You may specify the path of the e2fsprogs upon use
use Filesys::Ext2 {PATH=>'/path/to/binaries'};
Otherwise the module will use the default path /usr/bin/
Change the mode of @files to match $mask. $mask may be a bitmask or symbolic mode eg;
=DIE +cad -s-i
Throws an exception upon failure.
Returns bitmasks respresenting the attributes of @files.
Same as CORE::lstat, but appends the numerical attribute bitmask.
CORE::lstat
Same as CORE::stat, but appends the numerical attribute bitmask.
CORE::stat
Accepts a bitmask and returns the symbolic mode. In list context it returns a symbol list like lsattr, in scalar context it returns a string that matches the - region of lsattr(1) eg;
s-----A------
chattr(1), lsattr(1)
Ideally this would be implemented with XS, maybe someday.
The bit mappings for attributes, from other/ext2_fs.h
Secure deletion
Undelete
Compress file
Synchronous updates
Immutable file
Writes to file may only append
Do not dump file
Do not update atime
Dirty compressed data
Not user modifiable.
Access raw compressed data
Not (currently) user modifiable.
Compression error.
btree format dir / hash-indexed directory
File data should be journaed
File tail should not be merged
Synchronous directory modifications
Top of directory hierarchies
Jerrad Pierce <jpierce@cpan.org>
To install Filesys::Ext2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Filesys::Ext2
CPAN shell
perl -MCPAN -e shell install Filesys::Ext2
For more information on module installation, please visit the detailed CPAN module installation guide.