Friday, 2 September 2011

Deep Magic - recover a file

We have hopefully managed to recover a file (or two) today from an existing process in which the files live in /tmp/, but if the process goes on too long, get deleted by the system
Find relevant Process ID
  >ps aux or top
  >pstree -p 

Work out files which have handles but are deleted
  >lsof -p 
  bwa     22039 srpipe    4r   REG      104,7  424718660  67171651 /tmp/iFCyWKyDjR/1.sai (deleted)
  bwa     22039 srpipe    5r   REG      104,7  401682372  67171652 /tmp/iFCyWKyDjR/2.sai (deleted)

Rebuild files
  >mkdir /tmp/iFCyWKyDjR
  >cat /proc/22039/fd/4 > /tmp/iFCyWKyDjR/1.sai
  >cat /proc/22039/fd/5 > /tmp/iFCyWKyDjR/2.sai

Check
  >ls -lh /tmp/iFCyWKyDjR
  total 789M
  -rw-rw-r-- 1 srpipe solexa 406M 2011-09-02 09:30 1.sai
  -rw-rw-r-- 1 srpipe solexa 384M 2011-09-02 09:30 2.sai

4 comments:

Joshua Smith said...

I'm glad to know more and read this great review. Let me share with insurance cheap quotes that is supported by best insurance companies. Customer could save on homeowners insurance rates which allow you to apply for cheap policy.

Avantika Singh said...

.Net Application Development OTS Solutions : ISO 9001 & Microsoft Certified Software Outsourcing & Development service provider company offering software Application development , IT outsourcing services to its clients across the globe.

Tom Desousa said...

Dear Web master,
I am requesting you to please delete my link which has submitted in your website. My website has got penalized by Google spam team. Because of that i am clearing my back links. I kindly request you please delete my all links. I will be very thankfully for your kindness.

1) I have submitted my Link in your website page URL:
http://vampiresoftware.blogspot.com/2011/02/perl-course-help.html
http://vampiresoftware.blogspot.com/2011/03/interesting-bug.html
http://vampiresoftware.blogspot.com/2011/06/bingo.html
http://vampiresoftware.blogspot.com/2011/09/deep-magic-recover-file.html
http://vampiresoftware.blogspot.com/2012/01/tex-odd-markup-language.html
http://vampiresoftware.blogspot.com/2012/10/bookmarklets-and-closing-window-with-js.html
http://vampiresoftware.blogspot.com/2013/03/a-very-handsontablejs.html
http://vampiresoftware.blogspot.com/2013/05/stumped-by-range.html
Delete Anchor Text:
Delphi Development,Java Application Development, Software Development Company,Software Development Outsourcing
Delete Anchor URL: http://www.otssolutions.com


Thanks and Regards


OTS Sol.

Tom Desousa said...

Dear Web master,
I am requesting you to please delete my link which has submitted in your website. My website has got penalized by Google spam team. Because of that i am clearing my back links. I kindly request you please delete my all links. I will be very thankfully for your kindness.

1) I have submitted my Link in your website page URL:
http://vampiresoftware.blogspot.com/2011/02/perl-course-help.html
http://vampiresoftware.blogspot.com/2011/03/interesting-bug.html
http://vampiresoftware.blogspot.com/2011/06/bingo.html
http://vampiresoftware.blogspot.com/2011/09/deep-magic-recover-file.html
http://vampiresoftware.blogspot.com/2012/01/tex-odd-markup-language.html
http://vampiresoftware.blogspot.com/2012/10/bookmarklets-and-closing-window-with-js.html
http://vampiresoftware.blogspot.com/2013/03/a-very-handsontablejs.html
http://vampiresoftware.blogspot.com/2013/05/stumped-by-range.html
Delete Anchor Text:
Delphi Development,Java Application Development, Software Development Company,Software Development Outsourcing
Delete Anchor URL: http://www.otssolutions.com


Thanks and Regards


OTS Sol.