Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


linux recycle bin?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

linux recycle bin?

namhuynamhuy Member

!@#$% I was working with a project at /home/user/project/

while working some how i did rm -rf /home/user/project/ w/o knowing it until I hit "enter". !@#$% hours of my working x_x . After I hit enter i just realized I just did something really stupid x_x

Luckily I have an old backup but .. still many hours I just did today. Is there anyway to sort of recover them? Or how to prevent stupidly do rm -rf like me :(

Comments

  • IceCreamIceCream Member
    edited March 2014

    There isn't a native recycle bin on linux. Sorry. Install trash-cli for a recycle bin.

  • Unless you have physical access to the drive; AFAIK there's no way to recover your files.

  • not really a big deal since i can redo everything again but im so pissed of myself right now ~

  • Well same as in Windows - if you delete from console file are marked as deleted from FS, not moved to recycle bin. If you use GUI/DM in Linux, something like KDE, it might have a recycle bin implemented.

    Apart from what was already suggested, in your case you can try undelete. But its really not a recycle bin, undelete instead.

    http://extundelete.sourceforge.net/

  • JanevskiJanevski Member
    edited March 2014

    @namhuy

    GAME OVER

    enter name

    A A A_

    The files are deleted from the filesystem, the only way is to scalpel them out, if they are not overwritten in the meantime. Anyhow, even in the best case scenario - a long, resource consuming, nerve wrecking procedure.

    I think that it is for the best to just to do it over again.

  • said: some how i did rm -rf /home/user/project/ w/o knowing it

    If I typed rm -rf /home/user/project/ without knowing it, I'd start to worry.

  • @sleddogsleddog thats what happens when you work in front of the screen from no day light to sun rise x_x. I didnt know about trash-cli, i should try it later.

  • I accidentally typed rm -rf / --no-preserve-root. Bad? [/ironyoff]

    trash-cli is pretty easy. Another possibilty is undelete but I'm not quite sure how it works. (I think it's name was undelete)

  • namhuy said: thats what happens when you work in front of the screen from no day light to sun rise x_x

    May want to start reviewing .bash_history each morning :)

  • howardsl2howardsl2 Member
    edited March 2014

    Use "safe-rm". It warns you if you want to delete important files/directories. Don't forget to add your project folder to its blacklist.
    Project site: https://launchpad.net/safe-rm
    Originally at: http://code.google.com/p/safe-rm/
    Other tricks can be found here.

  • It sucks when this type of stuff happens. I once lost all my data because the hdd died randomly while i was working on something. I've learnt to keep a backup all the time since then. Right now I use git and push changes to the dev branch every time i make a significant change. When i was using windows, I was using dropbox to autosync all the files in my project directory, but this might not be the best thing to do since i was always running into problems.

Sign In or Register to comment.