LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is there a "recycle bin" without desktop environment ? (https://www.linuxquestions.org/questions/linux-newbie-8/is-there-a-recycle-bin-without-desktop-environment-872093/)

amoka 03-31-2011 04:22 AM

Is there a "recycle bin" without desktop environment ?
 
Hi All,

Without a desktop environment (KDE,Gnome, ...) , is there a way to recover deleted files (like a recycle bin or a trash directory).

I'm using a RedHat distribution

Thanks & Regards

David the H. 03-31-2011 04:47 AM

Not by default. There are some scripts available on the web that simulate the function of one. Also there's a library called libtrash that will intercept delete commands and shift the files to a trash directory. I've never used it myself, but here's the readme explaining how it works.

ftp://hpux.connect.org.uk/hpux/Devel....2.README.html

retxed 03-31-2011 05:46 AM

Got a good reading article Here
sounds promising though.

Aquarius_Girl 03-31-2011 06:48 AM

and you can also run rm -i file.c, -i option will "ask" before sending it to hell.

amoka 03-31-2011 08:55 AM

Thanks for your answers.
No easyway to recover.

knudfl 03-31-2011 11:18 AM

I'd guess, you have the hidden "Trash folder" where files are moved to
with "Move to Trash" : /home/<name>/.local/share/Trash/files/

A command would do the same :
mv 'file' /home/<name>/.local/share/Trash/files/

And : Welcome to LQ. .. :) ..

DavidMcCann 03-31-2011 05:16 PM

Can you not just create a suitable directory and use alias to redefine rm as mv to the trash?

themanwhowas 03-31-2011 06:35 PM

Do you need to recover a deleted file amoka? If you do, you should look at a program called 'foremost'. I have recommended foremost two times in two days. I'm not affiliated, I'm just a big fan

amoka 04-01-2011 07:29 AM

Again Thanks for your friendly answers.

@knudfl : I don't have any "Trash folder", even hidden, under /home , I guess is not by default on Redhat
@themanwhowas : No, that was just a question, like most of newbie i'm very careful especially with "rm"


All times are GMT -5. The time now is 10:54 AM.