This repository has been archived on 2022-04-16. You can view files and clone it, but cannot push or open issues or pull requests.
|
#!/usr/bin/perl
|
|
|
|
#source: http://www.etherealbits.com/2012/06/the-perl-script-that-may-save-your-life/
|
|
|
|
open(DEV, '/dev/sda1') or die "Can't open: $!\n";
|
|
while (read(DEV, $buf, 4096)) {
|
|
print tell(DEV), "\n", $buf, "\n"
|
|
if $buf =~ /stringtosearchfor/;
|
|
}
|