Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


how to recover file?

Posted on 1999-07-10
Medium Priority
Last Modified: 2012-06-27
I am using Freebsd 3.1 Release. I "rm" a file, and I need to recover it. Who can help me? Urgent!!!
Question by:jokeking
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

donner earned 760 total points
ID: 2011435
The rm command unlinks the inode and removes the name from the directory.  There are only three ways you might recover the file:

1 - if the file had a link to it from somewhere else.  The file only actually gets deleted from the physical disk when the reference count, the number of hard links that actually
point at the physical file, goes to zero.  If you removed the last link, then you're probably hosed.

2 - if you shut down the system immediately after you removed the file you *might* be able to bring it up single user and then rummage around the raw device and find the blocks that used to be the file.

3 - if you had backed up the system recently, you could find the file on the backup media.

I don't believe that there is anything like the Windows "recycle bin" in that system.  If it existed, it would almost certainly be implemented as a change to the rm(1) program, so
doing "man 1 rm" would tell you what you might do to recover the file.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

671 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question