Thread: Restore accidentally deleted files?

  1. #1
    Registered User
    Join Date
    Aug 2014
    Posts
    20

    Restore accidentally deleted files?

    I accidentally erased everything using rm -r , thinking that i would only erase the contents of the directory that i was in. now everything is gone!! is there any way i can restore in linux? help!!

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    The question has nothing to do with "Linux Programming".

    The question is just a technical question and should be moved.

    As for the question, we would need to know the exact command and distribution.

    However, you are probably out of luck.

    In the future, you should consider using `mv' until you are intimately familiar with `rm'.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    https://en.wikipedia.org/wiki/List_o...overy_software
    You need to STOP using the machine with the lost files ASAP. The more you use it, the more will be lost permanently.

    Start with the link and find some suitable s/w you can burn to a live CD / USB, then boot the machine from that media.
    Also have to hand another USB drive to copy any data it finds off the "dead" disk. You don't want to write to it at all until you've exhausted all the recovery options available to you.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    "Data recovery" can range from a variety of topics. For this situation you want to "undelete" or "unerase" is normally what its called. One tool claiming ability to do this for ext3/4 filesystems (usually the default filesystem) -

    extundelete: An ext3 and ext4 file undeletion utility

    As mentioned you should boot from a live CD to make the recovery attempt and not the system itself. Reason is, every write action you take on the affected filesystem could potentially overwrite your deleted files.

  5. #5
    Registered User
    Join Date
    Sep 2014
    Posts
    25
    Hi, I was able to browse this thread and I find it very useful in the future if ever I encountered such problems about accidentally delete my files . Thanks for sharing your suggestions and recommendations for restoring files or data recovery as well

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Did I Accidentally Create a Virus?
    By chaucer345 in forum C++ Programming
    Replies: 14
    Last Post: 07-09-2012, 07:34 AM
  2. Accidentally Compiled a .c file over itself....
    By John_L in forum C Programming
    Replies: 8
    Last Post: 09-23-2007, 02:18 PM
  3. Restoring deleted files
    By Moony in forum Windows Programming
    Replies: 5
    Last Post: 06-15-2007, 01:31 AM
  4. Files that are not deleted
    By ammar in forum Tech Board
    Replies: 5
    Last Post: 11-29-2002, 09:31 PM
  5. I deleted .cpp files. ARRGGHH
    By ihsir in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 03-14-2002, 12:49 AM

Tags for this Thread