Results 1 to 9 of 9

Thread: Accidentally Deleted Folder, How To Recover It?

  1. #1
    Join Date
    May 2009
    Location
    Thunder Bay, ON
    Beans
    8
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Accidentally Deleted Folder, How To Recover It?

    Hey, while trying to remove a theme I installed, I accidentally deleted the entire theme folder instead! lol

    This is what went down:

    root@ubuntu:/home/auzzie# sudo rm -rf SlicknesS /usr/share/themes

    as you can see, it removed the entire themes folder, not just the 'slickness' folder.

    Is there any way I can get this back? I basically lost all my themes right there, would be great if I can recover them, or just get the default ubuntu theme pack back at the very least.

    Thanks!

  2. #2
    Join Date
    Sep 2008
    Location
    Cheshire, UK.
    Beans
    333
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Accidentally Deleted Folder, How To Recover It?

    If this doesn't help it's still a useful bookmark
    "Daddy? Do pigs lay sausages?" - Little Miss PocketDog

  3. #3
    Join Date
    May 2009
    Location
    Thunder Bay, ON
    Beans
    8
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Accidentally Deleted Folder, How To Recover It?

    Seems a little over my head :/

  4. #4
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Accidentally Deleted Folder, How To Recover It?

    You may want to have a look at the TestDisk package that is in the repositories. It should help you restore the missing directory.

  5. #5
    Join Date
    Feb 2007
    Location
    U.S.A.
    Beans
    1,835
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Accidentally Deleted Folder, How To Recover It?

    +1 for Testdisk and Photorec.
    For sure the price of recovering is going to require some homework, but if the data is important, then the homework is worth it. In addition to the page PocketDog posted I will post http://www.cgsecurity.org/wiki/PhotoRec .

    Read PocketDog's page first, if you simply accidentally deleted a a folder, and have a healthy hard drive then its probably advisable to skip to https://help.ubuntu.com/community/DataRecovery#Photorec .

    I've used Photorec twice now, and while I'm no wiz at it yet, I can say that its not terribly difficult to figure out.

    Oh be sure to look at TestDisk's undelete files tutorial as well I should think: http://www.cgsecurity.org/wiki/TestD..._file_for_ext2

    GL

  6. #6
    Join Date
    May 2009
    Location
    Thunder Bay, ON
    Beans
    8
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Accidentally Deleted Folder, How To Recover It?

    Of the links provided, I was leaning toward testdisk, however Im not sure which version I need, and sudo apt-get isnt having any of it.

  7. #7
    Join Date
    Oct 2006
    Location
    Lyon, France
    Beans
    839
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Accidentally Deleted Folder, How To Recover It?

    Mmh ?

    apt-cache show testdisk works for me (in Jaunty). sudo apt-get install testdisk should work.
    This is the first age that's paid much attention to the future, which is a little ironic since we may not have one.
    -- Arthur C. Clarke

  8. #8
    Join Date
    May 2009
    Location
    Thunder Bay, ON
    Beans
    8
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Accidentally Deleted Folder, How To Recover It?

    Ive got testdisk installed, but I cant seem to locate the directory where the file was deleted within testdisk. I have a windows partition as well for cad software

  9. #9
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,541
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Accidentally Deleted Folder, How To Recover It?

    Quote Originally Posted by Auzzie666 View Post
    root@ubuntu:/home/auzzie# sudo rm -rf SlicknesS /usr/share/themes
    That's what you get for being logged in as "root"

    And in case you were not told before ...
    DO NOT WORK AS "root" !!

    You now know why

    Seriously though ... you should check your syntax before you issue dangerous commands. Being "root" and wanting to use "rm" => dangerous. Better check the manual first if you really got the syntax right:
    Code:
    man rm
    Quote Originally Posted by Auzzie666 View Post
    ... it removed the entire themes folder, not just the 'slickness' folder.
    Of course it did. Because that's exactly what you told it to do. Know thy syntax!!

    Quote Originally Posted by Auzzie666 View Post
    Is there any way I can get this back?
    Honestly, I would not bother with this. Why not just reinstall the themes? e.g.
    Code:
    sudo apt-get --reinstall install gnome-themes
    sudo apt-get --reinstall install tropic-look
    sudo apt-get --reinstall install human-theme
    sudo apt-get --reinstall install gnome-icon-theme
    sudo apt-get --reinstall install hicolor-icon-theme
    .. and so on.

    This should pull the default OS themes (human, hicolor) from the Internet repos, plus add a few extra themes (gnome-themes, tropic); thus restoring the default theme location "/usr/share/themes"

    Any extra themes that you may have downloaded and installed by hand (via tar.gz file) should then be easy to add again once all the OS defaults are back.

    Honestly ... I'd do it this way and not bother with restoring the files. Restoring would take waaay longer then just simply reinstalling the themes again.

Bookmarks

Posting Permissions

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