1
1
Fork 0

added source to lifesaver.sh

This commit is contained in:
david 2013-06-23 13:51:44 +02:00
parent 0916850a86
commit b937f4840a
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
#!/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 =~ /fletter/;
if $buf =~ /stringtosearchfor/;
}