From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6412 invoked from network); 3 May 2006 09:57:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 May 2006 09:57:35 -0000 Received: (qmail 15307 invoked from network); 3 May 2006 09:57:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 May 2006 09:57:27 -0000 Received: (qmail 25355 invoked by alias); 3 May 2006 09:57:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10203 Received: (qmail 25345 invoked from network); 3 May 2006 09:57:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 May 2006 09:57:19 -0000 Received: (qmail 14151 invoked from network); 3 May 2006 09:57:19 -0000 Received: from ms-2.rz.rwth-aachen.de (HELO ms-dienst.rz.rwth-aachen.de) (134.130.3.131) by a.mx.sunsite.dk with SMTP; 3 May 2006 09:57:18 -0000 Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0IYO00HFZOZFQ8@ms-dienst.rz.rwth-aachen.de> for zsh-users@sunsite.dk; Wed, 03 May 2006 11:57:16 +0200 (MEST) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Wed, 03 May 2006 11:57:15 +0200 (MEST) Received: from fsst.voodoo.lan (u-3-056.vpn.RWTH-Aachen.DE [137.226.99.56]) by relay.rwth-aachen.de (8.13.6/8.13.3/1) with ESMTP id k439v9Gt026261 for ; Wed, 03 May 2006 11:57:15 +0200 (MEST) Received: from hawk by fsst.voodoo.lan with local (Exim 4.62) (envelope-from ) id 1FbE6P-00014B-Hk for zsh-users@sunsite.dk; Wed, 03 May 2006 11:57:01 +0200 Date: Wed, 03 May 2006 11:57:01 +0200 From: Frank Terbeck Subject: Re: add an mv protection ? In-reply-to: <44587A71.5080500@ulpmm.u-strasbg.fr> To: zsh-users@sunsite.dk Mail-followup-to: zsh-users@sunsite.dk Message-id: <20060503095701.GP2668@fsst.voodoo.lan> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline Operating-System: Linux 2.6.16.1 i686 User-Agent: Mutt/1.5.11+cvs20060403 References: <44587A71.5080500@ulpmm.u-strasbg.fr> Marc Chantreux : > % echo * > a.pl b.pl > % mkdir old > % mv *pl > > Here, i forget the target ( old ). The result is : > mv a.pl b.pl > i've lost the b.pl content! > is there a way to hook this case and ask a confirmation ? Hi Marc, % man mv [snip] -i, --interactive prompt before overwrite [snap] I don't know, if it's possible to check if an overwrite is intended or not. So, if you really need it, I'd use "alias mv='mv -i'". Regards, Frank