added source to lifesaver.sh
This commit is contained in:
parent
0916850a86
commit
b937f4840a
|
@ -1,6 +1,9 @@
|
||||||
#!/usr/bin/perl
|
#!/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";
|
open(DEV, '/dev/sda1') or die "Can't open: $!\n";
|
||||||
while (read(DEV, $buf, 4096)) {
|
while (read(DEV, $buf, 4096)) {
|
||||||
print tell(DEV), "\n", $buf, "\n"
|
print tell(DEV), "\n", $buf, "\n"
|
||||||
if $buf =~ /fletter/;
|
if $buf =~ /stringtosearchfor/;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue