• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Server Linux server missing files fix (9/19)

Linux server missing files fix

Linux server missing files fix

Step 1: Let's view the contents of that file with the command less ~/test_file.
Step 2: With that file open in your terminal window, hit the key combination Ctrl-z to zombie the process.
Step 3: Let's make sure our test file still exists. If you issue the command ls -l ~/test_file you will see still your file there. So far so good.
Step 4: At the same command prompt issue the command rm ~/test_file to delete the file.
Step 5: Check to see if the file is there with the command ls ~/test_file. You should not see that file listed now. Because the command we used to view the file (less ~/test_file) was zombied, the data has been held. Let's recover it.
Step 6: Issue the command lsof | grep test_file. This command will take some time to run, but will eventually spit out the needed information which will look similar to:
less 14675 zombie 4r REG 8,1 21 5127399 /home/zombie/test_file (deleted)
What we need is the PID of the file (Which is in the second column
 
Upvote 0