|
|
Use an alias
In .bashrc, .tcshrc or .cshrc, add a line such as:
Use an alias
I guess that one nice thing about using the ./-i file is that it can travel with the folder .... so that, if another user tries to "rm *", and she doesn't have an alias set up to protect her, the ./-i file will provide that last-ditch warning before she deletes files ..... no?
Use an alias
In general it isn't recommended to alias rm -i as rm. The reason for this is that you can get used to relying on it and if you move to another machine or some other situation where your resource file isn't loaded, then you can make a big mistake. Instead its recommended to use an alias like,
Use an alias
Another safer option is to use the alias del 'rm -i' instead of alias rm 'rm -i'. You might also want to add the aliases copy 'cp -i' and move 'mv -i' while
VERY bad idea
One day you will sit on a OS X box without this alias and enter "rm -rf /" - 2 min. later the whole installation is gone...
VERY bad idea
Uh, even if you alias rm -i with rm, if you type rm -fr /*, you'll still toast your machine. The "-f" flag (which forces the delete to occur without any prompting) seems to override the "-i" flag (which asks the user to confirm deletion). I typed rm -ifr <file>, and it deleted without prompting.
Use an alias
Excellent point! This is the method I have been using for years with the BSDs. It especially helps when people are "talkinatcha" while you are typing! :) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.07 seconds |
|