bergman on 22 May 2012 13:00:13 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] toy story2 nearly lost with rm*


In the message dated: Tue, 22 May 2012 15:49:25 EDT,
The pithy ruminations from Doug Stewart on 
<Re: [PLUG] toy story2 nearly lost with rm*> were:
=> I'm a professional sysadmin -- have been for approaching 15 years. I always alias rm in this fas

I'm a professional sysadmin -- have been approaching "professional" for 25
years.

I don't alias "rm" in this fashion.

On systems where tasks are shared with other admins, and where the OS
distribution default is to alias rm, I usually leave the alias as it is,
and use "rm -f", or "/bin/rm", or "\rm" (or, on those bad days when I
really want to run fsck, I just use "clri").


=> hion, as it acts as an excellent "Whoah, Hoss!". If I'm deleting a large number of files, I inev
=> itably run into the alias annoyance, stop, think, consider my actions, unalias rm and then go ab
=> out my business. When the sudo session times out, I get the alias safeguard back. 
=> 

I would suggest that if you are used to having the safeguard, that you
don't actually unalias "rm", but use some other mechanism to run "rm"
non-interactively....but whatever works for you.

I don't think that "to alias or non to alias" is the important question,
but whether you have backups, change control procedures procedures,
revision control, etc. that will mitigate the impact of the inevitable
mistake. At some point, there will be a mistake, regardless of any alias.



Mark


=> --
=> Doug Stewart
=> 
=> On May 22, 2012, at 3:40 PM, Morgan Jones <morgan@morganjones.org> wrote:
=> 
=> > 
=> > I've never understood aliasing rm to rm -i.  I do a lot of work as root and with the exception
=>  of individual files I almost always end up running \rm -rf or just unaliasing rm as rm -i is cu
=> mbersome for large numbers of files.
=> > 
=> > The irony of course is it's large numbers of files where you particularly want to be careful w
=> ith rm -r.  I find I just think long and hard before running rm -rf and never run rm -rf * but i
=> nstead cd up a directory and run rm -rf directory/* or just rm -rf directory depending on my goa
=> l.
=> > 
=> > Do any of you the are professional sysadmins or just do a ton of system work really use rm ali
=> ased to rm -i?  Is there a trick I'm missing?
=> > 
=> > -morgan
=> > 
=> > 
=> > On May 22, 2012, at 2:07 PM, Doug Stewart wrote:
=> > 
=> >> Which is why you should always alias rm to "rn -i" for root. 
=> >> 
=> >> --
=> >> Doug Stewart
=> >> 
=> >> On May 22, 2012, at 2:45 PM, drew craig <axcraig@gmail.com> wrote:
=> >> 
=> >>> Hi all, I brought this little story up in our meeting last evening.  The link goes to Linux 
=> Today.
=> >>> 
=> >>> pixars toy story2 nearly lost because of a linux command
=> >>> 
=> >>> -- 
=> >>> drew
=> >>> ___________________________________________________________________________
=> >>> Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> >>> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> >>> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
=> >> ___________________________________________________________________________
=> >> Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> >> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> >> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
=> > 
=> > ___________________________________________________________________________
=> > Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> > Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> > General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
=> ___________________________________________________________________________
=> Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
=> 


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug