LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-21-2007, 09:00 PM   #16
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49

This topic was covered a little bit in a book I was given called "Wicked Cool Shell Scripts" by Dave Taylor. He has a shell script that modifies the rm command to move things to a holding directory through rm rather than actually deleting them. Basically, it works the same way the recycle bin does in greatly inferior operating systems.

I won't print the whole script out here, as there may be some copywrong issues with doing so, but it is short, and can be found in its entirety at http://www.intuitive.com/wicked/show...i?015-newrm.sh

Peace,
JimBass
 
Old 01-21-2007, 09:03 PM   #17
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by JimBass
This topic was covered a little bit in a book I was given called "Wicked Cool Shell Scripts" by Dave Taylor. He has a shell script that modifies the rm command to move things to a holding directory through rm rather than actually deleting them. Basically, it works the same way the recycle bin does in greatly inferior operating systems.

I won't print the whole script out here, as there may be some copywrong issues with doing so, but it is short, and can be found in its entirety at http://www.intuitive.com/wicked/show...i?015-newrm.sh

Peace,
JimBass
Of course, that only works if you're using it before the files get blown away. Just for the record.
 
Old 01-22-2007, 01:51 PM   #18
sacoskun
LQ Newbie
 
Registered: Feb 2006
Location: Turkey
Distribution: SuSE SLED 10
Posts: 8

Original Poster
Rep: Reputation: 0
Thumbs up

Thanks all of you for your great help.

I started to use a script that moves the files to a "~/recycleBin/" directory when I type "del" and I use "del" command to delete files and I'll also let "rm" command to be available for certain deletes

I had backup for the first time and this was not a problem, I feel lucky.

Thanks again,
 
Old 01-22-2007, 10:34 PM   #19
wahming
Member
 
Registered: Jan 2007
Posts: 133

Rep: Reputation: 15
Just remember - use shred for sensitive files, rm means they're gone, but recoverable
 
Old 01-23-2007, 12:45 AM   #20
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Quote:
Originally Posted by wahming
Just remember - use shred for sensitive files, rm means they're gone, but recoverable
depends on the file system - read the man page
 
  


Reply



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
Accidentally removed part of my TOP panel on Suse 10.0. How do I get it back?? Balarabay1 SUSE / openSUSE 3 08-20-2006 08:26 AM
removed files from /etc Spartan552 *BSD 8 11-08-2005 07:16 PM
kernel files removed cbarbot Linux - Newbie 1 04-14-2004 01:05 PM
'Accidentally' removed XFree86-libs, how can I bring back the desktop? freddan Fedora 3 03-22-2004 08:56 AM
Removed files-where have they gone!!!???? the_rydster Linux - General 2 11-13-2003 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration