Question: How to Recover Deleted Files in Linux?
Contents Linux Operating System – Using Lsof to Recover Deleted Files Make a File: /> Cd /Tmp. Run Something to Hold the File Open: Scum 97 Tmp> Less Myfile &...
Contents
Linux Operating System – Using lsof to Recover Deleted Files
- Make a file: /> cd /tmp.
- Run something to hold the file open: scum 97 tmp> less myfile &
- “Accidentally” remove the file: tmp> rm myfile.
- Use lsof to show the open file descriptor of the process:
- Locate the open file descriptor in /proc:
- The open file can now be copied back to its original location:
How can I recover permanently deleted files in Linux?
You’ll see the interface below:
- PhotoRec Data Recovery Tool for Linux.
- Select Partition to Proceed File Recovery.
- Linux File Recovery Options.
- Specify Recovery File Type.
- Save File Recovery Settings.
- Select Filesystem to Recover Deleted Files.
- Choose Filesystem to Analyze.
- Select Directory to Save Recovered Files.
Must Read
Is there a way to recover deleted files in Linux?
You can use a command line tool like testdisk to recover such deleted files in Linux easily. You can find the text version of the article here: