restaurar archivo corrupto
Script para recuperar archivos que se han perdido
Si tratas de entrar a un archivo y no se abre porque se ha estropeado existe una forma de poder recuperarlo.
Si el archivo era realmente importante lo que se puede hacer es escanear el disco duro por bloques buscando la informacion que contiene, alguna palabra que sea lo suficientemente especifica como para estar solo en el archivo que acabas de perder.
El script es el siguiente:
#!/usr/bin/python import os for i in range(0,1000): print "Pasada por el bucle:" print i print "==========================" seek = i * 100000 os.system('rm /fich%s' % str(i-1)) os.system('dd if=/dev/sda3 of=/fich%s bs=512 count=100000 skip=%i' % (str(i), seek,) ) os.system("grep --binary-files=text -A 200 -B 200 -b '<span style="font-weight: bold;">palabra que sabes que esta en el fichero y que no crees que vaya a estar en otro</span>' /fich%s >> <span style="font-weight: bold;">results.txt</span>" % str(i)) os.system('rm /fich%s' % str(i)) os.system('sync')
Buscador
Mi foto aleatoria
Comentarios recientes
CategorÃas
- Aplicaciones (34)
- Deportes (5)
- Exponentcms (15)
- Firefox (4)
- FotografÃa (15)
- Hardware (17)
- HTML CSS JavaScript y PHP (14)
- Humor (7)
- Internet (36)
- Musica (27)
- Posicionamiento Seo (12)
- Programación (7)
- Scripting (7)
- Seguridad (27)
- Sin categorÃa (2)
- Sistemas operativos (7)
- SQL-Bases Datos (3)
- Varios (87)
- Virtualización (21)
Enlaces
Archivos
- agosto 2011 (1)
- junio 2011 (2)
- mayo 2011 (1)
- abril 2011 (3)
- marzo 2011 (1)
- febrero 2011 (1)
- diciembre 2010 (1)
- noviembre 2010 (1)
- julio 2010 (2)
- junio 2010 (2)
- mayo 2010 (4)
- abril 2010 (1)
- marzo 2010 (1)
- febrero 2010 (5)
- enero 2010 (4)
- diciembre 2009 (5)
- noviembre 2009 (9)
- octubre 2009 (4)
- septiembre 2009 (9)
- agosto 2009 (9)
- julio 2009 (20)
- junio 2009 (8)
- mayo 2009 (13)
- abril 2009 (12)
- marzo 2009 (13)
- febrero 2009 (18)
- enero 2009 (15)
- diciembre 2008 (14)
- noviembre 2008 (14)
- octubre 2008 (18)
- septiembre 2008 (7)
- agosto 2008 (8)
- julio 2008 (3)
- octubre 2007 (4)
