Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Trash and the ubuntu root user

  1. #1
    Join Date
    Apr 2006
    Beans
    Hidden!

    [3/4 SOLVED] Trash and the ubuntu root user

    I opened nautilus with sudo.

    I deleted a large file while in the nautilus launched as root. Big mistake. The space has not been recovered.

    It is not in the trash bin or in /home/user/.local/share/Trash

    and I can not find a corresponding folder for the root user.

    Where did that file go and why is it still taking up space if i have deleted it.

    How can I recover this space as it is a very sizable bit of space.

    Thanks.
    Last edited by sefs; December 8th, 2009 at 06:07 PM.

  2. #2
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Trash and the ubuntu root user

    Run these in the terminal:

    Code:
    rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
    Code:
    sudo rm -rf /root/.local/share/Trash/*/** &> /dev/null

  3. #3
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Trash and the ubuntu root user

    Quote Originally Posted by wojox View Post
    Run these in the terminal:

    Code:
    rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
    Code:
    sudo rm -rf /root/.local/share/Trash/*/** &> /dev/null
    What I am saying is there is no "/root/.local/share/Trash/*/**"

    It simply does not exist for the root user.

    I have examined it via the terminal.
    And in nautilus when launched at root if i click on the trash folder I get this error

    The folder contents could not be displayed.
    Sorry, could not display all the contents of "trash": Operation not supported

    Which is most likely because there is no /root/.local/share/Trash folder.

    This has always been the case for me after a fresh install of ubuntu from the alternate CD. It never bother me until now that I need to know where files go when i delete them in nautilus as root and there is no corresponding /root/.local/share/Trash

  4. #4
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Trash and the ubuntu root user

    How exactly did you delete the file ? Shift+Delete, Right Click or just Delete ?

  5. #5
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Trash and the ubuntu root user

    Quote Originally Posted by wojox View Post
    How exactly did you delete the file ? Shift+Delete, Right Click or just Delete ?
    I had launched nautilus by going gksudo nautilus.

    Then while in there I click on a file and deleted it from within natuilus by pressing the delete key. It disappeared.

    To exactly where I am not sure.

    I've attached a file to tell the story of the no Trash folder for root.
    Attached Images Attached Images

  6. #6
    Join Date
    Mar 2009
    Location
    Brazil
    Beans
    475
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Trash and the ubuntu root user

    Use the disk space usage analyser, I think it's inside System > Administration. This way you can see where big files are, and maybe find that one.
    Ubuntu User #27453 | Linux User #490358
    "Don't preach Linux, mention it"
    "Linux is not Windows"
    73% of statistics in forums are made up on the spot

  7. #7
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Trash and the ubuntu root user

    Quote Originally Posted by Marlonsm View Post
    Use the disk space usage analyser, I think it's inside System > Administration. This way you can see where big files are, and maybe find that one.
    I see Disk utility but no diskspace analyzer

  8. #8
    Join Date
    Feb 2008
    Location
    Lancashire, UK
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Trash and the ubuntu root user

    Assuming you know the file's name, why not just search for it... before deleting it properly this time

    I'd use "find" from a terminal but a Nautilus search (as root of course) from the filesystem root (/) should find it.

  9. #9
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Trash and the ubuntu root user

    Try this, and post the output
    Code:
    lsb_release -id
    sudo ls -AlR /root/.local/share/Trash
    sudo touch aaa_delete_me
    gksu nautilus $PWD
    -delete the file "aaa_delete_me"
    -close nautilus
    Code:
    sudo ls -AlR /root/.local/share/Trash
    If the trash directory does not exist, it should be created by nautilus the first time you move something to trash.

  10. #10
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Trash and the ubuntu root user

    Quote Originally Posted by John Bean View Post
    Assuming you know the file's name, why not just search for it... before deleting it properly this time

    I'd use "find" from a terminal but a Nautilus search (as root of course) from the filesystem root (/) should find it.
    I do not know weather to hug ya or buy you a beer (non-alcoholic) but you did it man!!!

    In /home i have two folders...

    /home/.Trash-root
    /home/.Trash-0

    I ran the find command as root from the root directory like you said and it turned that up. And all the files are in there

    This was a lesson well learned.

    Thumbs up!
    Last edited by sefs; December 8th, 2009 at 05:53 PM.

Page 1 of 2 12 LastLast

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
  •