Find the answer to your Linux question:
Results 1 to 8 of 8
Hi guys I was trying to fix my VLC that stoped working and as I was doing that I accidently typed the folowing command rm -r and now my files ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! dr_physica's Avatar
    Join Date
    Aug 2013
    Location
    Melbourne
    Posts
    38

    Need help to recover files.


    Hi guys I was trying to fix my VLC that stoped working and as I was doing that I accidently typed the folowing command rm -r and now my files are gone form my computer is there anyway to recover them? Everything is gone even the my favorite folder with all the important websites etc. Please Help!

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    899
    Here is a thread for ubuntu that should cover some options: undelete files on ext4 - Ask Ubuntu

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    i've used the Linux System Rescue CD and the ddrescue and TestDisk utils that come with it to save my bacon in the past.

  4. #4
    Just Joined! dr_physica's Avatar
    Join Date
    Aug 2013
    Location
    Melbourne
    Posts
    38
    Ok Thanks I'll give it a try. The problem was not only the files but the programs as well everything is gone just like after format.

  5. #5
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    if i were you, i'd only use recovery software to restore data files, not application files. you are better off reinstalling those.

    btw, be sure to set up these aliases for all users in future systems:

    Code:
    alias rm='/bin/rm -i'
    alias mv='/bin/mv -i'
    alias cp='/bin/cp -i'
    that will at least prompt you before deleting/overwriting files, provided that you don't also use the '-f' option.

  6. #6
    Just Joined! dr_physica's Avatar
    Join Date
    Aug 2013
    Location
    Melbourne
    Posts
    38
    So how do I actually recover my data? I have never had such problem on linux because Im new and I had linux for 3 months or so. Can anyone walk me through this what should I use ddrescue or testdisk because I've tried testdisk but I'm complete newbie with this and I don't know what I'm doing. In windows it was simple just roll back the system here is more complicated. Can anyone help out please. If I use ddrescue do I need to know what files where deleted and what directory was missing? It seems that I have deleted my direcotries but I don't rember which one it was? How can I rescue the files from unknown directory? It just raised more questions then answers.

  7. #7
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    899
    Quote Originally Posted by dr_physica View Post
    So how do I actually recover my data? I have never had such problem on linux because Im new and I had linux for 3 months or so. Can anyone walk me through this what should I use ddrescue or testdisk because I've tried testdisk but I'm complete newbie with this and I don't know what I'm doing. In windows it was simple just roll back the system here is more complicated. Can anyone help out please. If I use ddrescue do I need to know what files where deleted and what directory was missing? It seems that I have deleted my direcotries but I don't rember which one it was? How can I rescue the files from unknown directory? It just raised more questions then answers.
    You should read the thread I linked to. dd is for copying an entire partition or disk to another location. You want to undelete files, not use testdisk.

  8. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by mizzle View Post
    dd is for copying an entire partition or disk to another location.
    ddrescue is not the same as dd. anyway, i've used testdisk to undelete files just fine, but ymmv. there is a decent step by step guide here. the last time i used it was on ext2, though, not so sure about ext3/4.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •