From: pete@cbnewsl.cb.att.com (peter.j.fillingham)
Subject: SUMMARY: RESPONSE to DDEBss
Organization: AT&T Bell Laboratories
Date: Wed, 7 Oct 1992 00:52:07 GMT
Keywords: dont, beware


Subject: SUMMARY RE: DDEBs (DON'Ts, DON'T EVERs, & BEWARES)

THESE ARE THE RESPONSES TO MY INNITIAL POSTING: DDEBs


In article <1992Aug10.200222.45\@cbnewsl.cb.att.com> pete\@cbnewsl.cb.att.com (peter.j.fillingham) writes:
>
>I would like to suggest that a regularily updated file be maintained of   
>DDEBs (DON'Ts, DON'T EVERs, and BEWAREs); e.g.,                           
>an annotated list of things NOT TO DO with linux or which may be hazardous
>to the health of a linux usr; e.g.,                                       
>        DON'T EVER:                                                       
>        - arbitrarily delete files [you may make your system unusable]    
>        - use an OLD boot-image with a more recent root-image             
>                [e.g. boot-image-95 with root-image-96]   

This is only a problem when there are significant kernel / compiler changes 
that the new programs take advantage of.

For instance, in recent times GCC needed better FP support in the kernel, 
support for multiple shared library binaries was added, etc.

>        BEWARE:                                                           
>        - of updating binaries before testing them [give them a new name] 

Give the OLD binaries a new name, ie /usr/local/bin/foo /usr/local/bin/foo-.
Some programs look at the name, and take action based on argv[0].  
A good example would be compress/uncompress. 

>        - of compiling your own binaries IF you don't have sufficient     
>          memory/swap space                                               

Removing -O from makefiles, and using gcc1.40 rather than gcc2.x will cut
memory usage significantly.  Also, logout of a few virtual consoles to 
cut memory usage.  

>        DON'T use rm [ write an alias 'rmi=rm -i '] (even a typo rm - i * 
>        can produce a surprise)                                           
>        etc.                                                              

Everybody uses rm.  When you want something gone, you want something gone. 
You don't want a prompt.  However, if you use wildcards, you should sit on 
your hands for a few seconds, think what you just typed, and then do it.

From: chip\@tct.com (Chip Salzenberg)
Subject: Re: DDEBs (DON'Ts, DON'T EVERs, & BEWARES)

According to hargrove\@theory.TC.Cornell.EDU (Paul H. Hargrove):
>You're even better off (assuming bash) doing
>$ echo silly?file*
>sillyXfile1a    sillyYfile1b    sillyZfile327a  sillyqfileTHX1138
>$ rm !$  (or !* for multiple wildcards)

Even better:
$ echo silly?file*
sillyXfile1a    sillyYfile1b    sillyZfile327a  sillyqfileTHX1138
$ rm <ESC>. [expands to the last word on the previous line]


From: davison\@borland.com (Wayne Davison)
> In article <Bstv3p.2KD\@news.cso.uiuc.edu> thoth\@uiuc.edu (Ben Cox) writes:
> >When I want to remove files matching a wildcard, I always echo it first:
> >
> >$ echo silly?file*
> >sillyXfile1a    sillyYfile1b    sillyZfile327a  sillyqfileTHX1138
> >$ rm silly?file*
> 
> You're even better off (assuming bash) doing
> $ echo silly?file*
> sillyXfile1a    sillyYfile1b    sillyZfile327a  sillyqfileTHX1138
> $ rm !$  (or !* for multiple wildcards)

If you're using zsh, it can expand wildcards into the command-line.
This way if you type:

$ rm silly?file*

and hit tab, you'd see:

$ rm sillyXfile1a sillyYfile1b sillyZfile327a sillyqfileTHX1138

and you can simply hit return.  You can also "setopt magicspace" to have
it transform history references as you press space:

$ rm !!:3

would automatically replace the !!:3 with the 3rd argument of the prior
command as you hit space.  If you haven't tried zsh I recommend you give
it a whirl.
-- 
Wayne Davison
davison\@borland.com

--
Peter Fillingham >>>pls note NEW ADDRESS <<pete@panix.com>>
****finally leaving the MOTHER of all MOTHERS ****
Newsgroups: comp.os.linux