From owner-freebsd-current@FreeBSD.ORG Thu Sep 27 11:41:46 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3473F16A41A for ; Thu, 27 Sep 2007 11:41:46 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.freebsd.org (Postfix) with ESMTP id 063F713C44B for ; Thu, 27 Sep 2007 11:41:45 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from parancell.ongs.co.jp (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id B610B244C49; Thu, 27 Sep 2007 20:41:44 +0900 (JST) Message-ID: <46FB96F8.20600@freebsd.org> Date: Thu, 27 Sep 2007 20:41:44 +0900 From: Daichi GOTO User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: Martin Cracauer References: <46F905FD.9060208@freebsd.org> <20070925183248.GA38571@cons.org> In-Reply-To: <20070925183248.GA38571@cons.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Current , Masanori OZAWA Subject: Re: The safety expansion for FreeBSD rm(1) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2007 11:41:46 -0000 Martin Cracauer wrote: > My idea of a safety feature for rm(1): > > To solve the problem of doing > rm foo * > instead of > rm foo* > > Look at what the commandline arguments are. If at least > - one is appearing twice > - or at least one is not appearing at all > > , then do a "*" expand like from a shell (not perfect of course not > easy enough) and see whether all elements of "*" are there *plus* > others with no "/". If so, the above situation occured and you only > go ahead with a special flag. > > Martin Wow, it's a interest :) -- Daichi GOTO, http://people.freebsd.org/~daichi