LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-28-2013, 03:56 AM   #1
mzh
Member
 
Registered: Apr 2011
Location: Copenhagen
Posts: 71

Rep: Reputation: 0
Custom safe rm configuration


Hi
I have two questions about how to modify 'rm' to prevent unexpected removal of files.

1) How can I define that 'rm' is not executed, if a ' * ' wild card is passed (note the white-space before and after the asteriks).

2) How can I prevent 'rm' calls being added to the Bash history?

I heard about '-i' option and safe-rm so no need to point these out, but I wonder about how to do the above two things.

Thanks for any hints on this.
 
Old 01-28-2013, 04:01 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might want to look at libtrash. It moves files to trash instead of deleting. This includes all system level deletions.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Safe mode - on or off? (and a bonus question on how to find a configuration error) lenka Linux - Server 2 09-24-2012 03:40 AM
LXer: Custom Compiz Effects configuration in Ubuntu10.10 Maverick Meerkat LXer Syndicated Linux News 0 10-04-2010 12:00 PM
using menuconfig for custom configuration abhayadevs Linux - Embedded & Single-board computer 1 07-26-2010 11:25 PM
gdmsetup message: Could not access configuration file (custom.conf) x3n0471 Ubuntu 2 10-02-2007 03:07 PM
SSH custom configuration tarballedtux Linux - Networking 0 08-30-2001 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:58 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