LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-31-2011, 04:22 AM   #1
amoka
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
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
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-31-2011, 04:47 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
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
 
2 members found this post helpful.
Old 03-31-2011, 05:46 AM   #3
retxed
Member
 
Registered: Sep 2009
Location: Chennai
Distribution: Ubuntu 11.10 and back track 4
Posts: 45

Rep: Reputation: 9
Got a good reading article Here
sounds promising though.
 
1 members found this post helpful.
Old 03-31-2011, 06:48 AM   #4
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,615
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
and you can also run rm -i file.c, -i option will "ask" before sending it to hell.
 
1 members found this post helpful.
Old 03-31-2011, 08:55 AM   #5
amoka
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your answers.
No easyway to recover.
 
Old 03-31-2011, 11:18 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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. .. ..
 
Old 03-31-2011, 05:16 PM   #7
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 2,945

Rep: Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767
Can you not just create a suitable directory and use alias to redefine rm as mv to the trash?
 
Old 03-31-2011, 06:35 PM   #8
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, BT5, Slackware 12.0
Posts: 207

Rep: Reputation: 29
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
 
Old 04-01-2011, 07:29 AM   #9
amoka
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
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"
 
  


Reply

Tags
command line, trash, undelete


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Desktop Environment "shifts" after screensaver eveningsky339 Linux - Hardware 3 11-26-2010 03:45 PM
[SOLVED] Problem installing "GNOME Desktop Environment". Please help.. :( roshanekka Linux - Server 10 06-21-2010 11:52 AM
script using "/usr/bin/cat error" produces "cannot open" in cron Dcrusoe Programming 6 07-22-2009 03:30 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM
Suns' "Looking Glass" desktop environment jong357 Linux - General 24 03-30-2004 04:19 PM


All times are GMT -5. The time now is 02:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration