Article View: gnu.misc.discuss
Article #62990Re: Hurd questions
From: Christian Longshore Claiborn
Date: Tue, 28 Mar 1995 03:22
Date: Tue, 28 Mar 1995 03:22
38 lines
2346 bytes
2346 bytes
In article <D63qp4.90r@world.std.com> aml@world.std.com (Andrew M. Langmead) writes: Stefan 'Stetson' Skoglund <sp2stes1@ida.his.se> writes: >You have to decide whom is gonna do this check. >rm or the shell ?? There are two things that "rm" could do. Count the number of files in the directory, and see if they match the number of command line arguements. This would prevent "rm *" disasters. How are you going to do that? The Unix shell usually does wildcard expansion; that is, it translates '*' into all of the files into the directory. They become the command-line arguments. Check if every file name is valid before unlinking. This would prevent "rm * .o" disasters. And remove the usefulness of 'rm' in shell scripts, Makefiles, etc. I am of the school which believes that trying to patch this stuff over tends to make it a lot worse. Plus, how are you going to convince rm that you -really- want to do this? Most likely you'll need another command which will allow you to delete every file if you want, and then you'll get used to that and make the mistake again. I don't think the developers of the Hurd are all that interested in keeping newbies from screwing themselves. christian -- Christian Longshore Claiborn - opinions my own "Look at this show-off, Hancock. Pretty flamboyant signature for an insurance man." -- Ben Franklin (Stan Freberg)
Technical Details
Message-ID:
<CLC.95Mar27222212@hopper.ai.mit.edu>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!howland.reston.ans.net!spool.mu.edu!bloom-beacon.mit.edu!ai-lab!corn-pops.ai.mit.edu!clcReferences:
<81696@sdcc12.ucsd.edu> <3kpfba$k85@jak.cosy.sbg.ac.at> <SP2STES1.95Mar27110801@sol1.ida.his.se> <D63qp4.90r@world.std.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,ef34758fb4e8c162 X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1995-03-27 22:04:04 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!howland.reston.ans.net!spool.mu.edu!bloom-beacon.mit.edu!ai-lab!corn-pops.ai.mit.edu!clc From: clc@ai.mit.edu (Christian Longshore Claiborn) Newsgroups: gnu.misc.discuss Subject: Re: Hurd questions Date: 28 Mar 1995 03:22:12 GMT Organization: The Institute for the Study of Advanced Leprosy, Durham NH Lines: 38 Message-ID: <CLC.95Mar27222212@hopper.ai.mit.edu> References: <81696@sdcc12.ucsd.edu> <3kpfba$k85@jak.cosy.sbg.ac.at> <SP2STES1.95Mar27110801@sol1.ida.his.se> <D63qp4.90r@world.std.com> NNTP-Posting-Host: corn-pops.ai.mit.edu In-reply-to: aml@world.std.com's message of Mon, 27 Mar 1995 13:55:52 GMT