Path: utzoo!mnetor!uunet!seismo!esosun!cogen!celerity!jjw
From: jjw@celerity.UUCP (Jim )
Newsgroups: comp.unix.wizards
Subject: Re: globbing in the shell (Was Re: more rm insanity)
Message-ID: <517@celerity.UUCP>
Date: 8 Dec 87 19:44:47 GMT
References: <1257@boulder.Colorado.EDU> <6840002@hpcllmv.HP.COM> <9555@mimsy.UUCP> <1890@celtics.UUCP> <6774@brl-smoke.ARPA> <12441@think.UUCP> <6356@ncoast.UUCP> et al.
Reply-To: jjw@celerity.UUCP (Jim (JJ) Whelan)
Organization: /usr/lib/news/organization
Lines: 31
Keywords:


One thing I have not seen in all this discussion about "wildcard characters"
in rm is whether anything is accomplished if rm uses interactive mode
anytime it is invoked with wildcards?  I assume that "-f" can be used to
avoid interactive mode when large numbers of files are to be deleted and
in shell scripts.

I don't think this automatic interactive mode would have saved me from many
(if any) cases where I deleted a file inadvertantly:
	I have deleted as many files I shouldn't have by typing the full name
		without fully engaging my brain as I have by using wild cards.
	If the system started spitting file names at me when I was deleting
		files I would probably just start hitting the "y" key without
		really watching the files.
	If I was only trying to delete one file using wildcards I would be
		likely to type "rm x*x \n y" without looking at the screen,
		thereby possibly deleting a file I wanted and retaining the
		one I wanted to delete.
	I would soon tire of having to always respond to a list of file names
		so I would either get in the habit of always typing "rm -f"
		or alias rm to "rm -f".

Are others that much different from me?

I have also lost many more files to disk failures and system failures than I
ever have because wild cards are expanded in the shell.  Proper backup
procedures are required, and if they are in place the loss from an
inadvertant file deletion is manageable.  Those who are really worried about
file loss can always create their own file deletion script/alias to stash
the files away for a few days before final deletion.

					-- J. J. Whelan