LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 08-31-2010, 12:01 AM   #1
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 54
Has anyone here ever aliased rm to rm --preserve-root?


I am trying out this following modification to my ~/.profile:

Code:
alias rm=`rm --preserve-root`
Just so you know, this will, by default, prevent rm -rf / from being run, returning an error when rm -rf / is invoked. I want to know if any of you guys have ever tried this yourselves. I will possibly also add this to my system-wide /etc/profile.
 
Old 08-31-2010, 12:20 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,623
Blog Entries: 10

Rep: Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773
According to the man-page --preserve-root is the default
behaviour; if you want something other than that you have to
be explicit. Not sure what benefit an alias would give you.



Cheers,
Tink
 
  


Reply

Tags
profile


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shorewall with aliased IPs? fdelval Linux - Networking 2 08-21-2010 02:37 AM
overriding aliased commands curos Slackware 4 09-13-2006 03:32 PM
anti-aliased fonts sridharinfinity Slackware 1 10-25-2003 06:00 PM
Aliased my eth0, now what? kuso Linux - Newbie 5 09-10-2003 09:45 PM
eth0 aliased? tr6_linque Linux - Networking 1 06-25-2003 09:52 AM


All times are GMT -5. The time now is 11:17 PM.

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