LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > neonsignal
User Name
Password

Notices


Rate this Entry

undeleting files that are still open

Posted 06-10-2012 at 09:28 PM by neonsignal

Normally it is tricky to recover a file that has just been deleted, but if the file is open by an application, its node still exists on the filesystem.

First find out the process id of the application:
Code:
ps -e | grep application-name
Then list all the files that the application has open:
Code:
ls -l /proc/process-id/fd/
The ones that are to be recovered can be copied:
Code:
cp /proc/process-id/fd/file-number filename
Posted in Uncategorized
Views 1798 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:04 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration