Results 1 to 10 of 10

Thread: [SOLVED] OMG, I sent /home/user folder to /Trash...

  1. #1
    Join Date
    May 2011
    Beans
    9

    [SOLVED] OMG, I sent /home/user folder to /Trash...

    I tried to move a /home/user folder from an external harddrive to my internal /home folder running Xubuntu 12.04. I received an error indicating an .iso could not be copied, so I cancelled the operation and attempted to send the newly copied partial folder to /Trash in order to try, again; but I sent my internal /home/user folder, instead. To add to the tragedy, I panicked and cancelled the move to /Trash. Now, all that I can find in /home is the partial /home/user that I attempted to move from the external harddrive. I fear that I have lost the folder for good and that is very bad.

    I, hereby, nominate myself for stupid user of the millenium.

    I have found info on recovering lost partitions, but nothing that addresses my idiotic mistake (nothing is in lost+found). Is there a way to recover a lost folder that did not make it to /Trash or am I just plain out of luck?

    I wish to extend my humble gratitude to all who may consider this most regrettable dilemna.
    Last edited by LinuxNubian; July 12th, 2013 at 02:14 AM. Reason: Solved

  2. #2
    Join Date
    Jun 2008
    Location
    Ballard
    Beans
    2,239
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: OMG, I sent /home/user folder to /Trash...

    Can you just restore anything that happens to be in the trash?
    "We're all in this together, kid." --H. Tuttle (a.k.a. H. Buttle)
    "Maybe it's a layer 8 problem." --thatguruguy
    A High-Tech Blech!

  3. #3
    Join Date
    Apr 2013
    Location
    43.49°N 7.46°E
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: OMG, I sent /home/user folder to /Trash...

    you might try to run the following command
    Code:
    restore-trash *
    in a Terminal window; see http://manpages.ubuntu.com/manpages/...e-trash.1.html.

  4. #4
    Join Date
    May 2011
    Beans
    9

    Re: OMG, I sent /home/user folder to /Trash...

    Thank you, both, for responding. I forgot to mention that "user" (actually it was "luke") was root and the only user w/sudo privies, so I had to use chroot to get root w/:
    root@r2d2$ adduser help sudo

    Unfortunately, nothing is found in /Trash & restore-trash * seemed to only look for files in the current directory so I made a /home/luke directory, but no love:

    help@r2d2:~$ restore-trash *
    No files trashed from current dir ('/home/help')
    help@r2d2:~$ cd /home/luke
    bash: cd: /home/luke: No such file or directory
    help@r2d2:~$ mkdir /home/luke
    mkdir: cannot create directory `/home/luke': Permission denied
    help@r2d2:~$ sudo mkdir /home/luke
    help@r2d2:~$ cd /home/luke
    help@r2d2:/home/luke$ restore-trash *
    No files trashed from current dir ('/home/luke')
    help@r2d2:/home/luke$ restore-trash luke
    No files trashed from current dir ('/home/luke')

    Btw, the /home/luke folder was 100GB.

    I am looking into scalpel, now that I am able to execute commands as root, but it's gonna take some time to get familiar with it; the scalpel.conf is a challenge. I hope there is a simpler way to recover lost folders.

    Thank you, again, for responding...I lost a bunch of my sister's files & she's gonna kill me, if she finds out!

  5. #5
    Join Date
    Dec 2008
    Location
    UK
    Beans
    413
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: OMG, I sent /home/user folder to /Trash...

    Hi,

    Have you checked in roots trash for your files - /root/.local/share/Trash/files?
    Last edited by Azdour; July 11th, 2013 at 10:34 AM.

  6. #6
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: OMG, I sent /home/user folder to /Trash...

    Quote Originally Posted by LinuxNubian View Post
    I tried to move a /home/user folder from an external harddrive to my internal /home folder running Xubuntu 12.04.
    Did you move files in the terminal, or graphically? If you use the terminal, history should show the exact command you used, and if you post it here it should be easy to create a "reverse" command to undo the damage.

    I don't understand when you refer to /Trash, did you create a folder named Trash in the root folder / ? Your user's trash folder by default is located in /home/user/.local/share/Trash/

  7. #7
    Join Date
    May 2011
    Beans
    9

    [SOLVED]Re: OMG, I sent /home/user folder to /Trash...

    Quote Originally Posted by Azdour View Post
    Hi,

    Have you checked in roots trash for your files - /root/.local/share/Trash/files?
    BINGO! Thank you! That's exactly where it went. For the record, I had to check Files=>Show Hidden Files to find it with nautilus, which is what I used to delete the folder.

    I copied the misplaced file back into /home & I can't login to the 'luke' profile, but I can live with the new user profile...really just wanted the files back.

    Thank you, again, for the help everyone. I was really worried that interupting the Send To Trash process might have been fatal to it's contents.

  8. #8
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: [SOLVED] OMG, I sent /home/user folder to /Trash...

    LOL. I have to admit that your first post made my day. Not at you expense, but I was laughing because I have all been there many times. I have done even more unbelievable stunts.

    Regarding 'luke'. You can use either root or sudo to change luke's password, unless or course your not 'luke'. Here's a link that may help luke
    boot_info_script | AMD64 Athlon X2 Dual-Core - nVidia Geforce 6150 SE - 4GB DDR3

  9. #9
    Join Date
    Nov 2009
    Location
    de9fdc5c1ade9d205ac5e2622
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: [SOLVED] OMG, I sent /home/user folder to /Trash...

    Quote Originally Posted by VMC View Post
    LOL. I have to admit that your first post made my day. Not at you expense, but I was laughing because I have all been there many times. I have done even more unbelievable stunts.

    Regarding 'luke'. You can use either root or sudo to change luke's password, unless or course your not 'luke'. Here's a link that may help luke
    I once went to delete a lib/ of a program. Meant to do
    Code:
    rm -rvf lib/
    I accidentally put in
    Code:
    rm -rvf /lib/
    It was pretty dishearting watching everything fly through the command line on its way to extinction.

    ~AlphaA
    "Si Dieu n'existait pas, il faudrait l'inventer" -Voltaire

  10. #10
    Join Date
    Apr 2013
    Location
    43.49°N 7.46°E
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [SOLVED] OMG, I sent /home/user folder to /Trash...

    just a tip, that might seem silly but it isn't: remember to always use
    Code:
    rm -i <what you wish to delete>
    so you're able to see what is going to be deleted before it's removed from your HD.

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
  •