Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: add an mv protection ?
- X-seq: zsh-users 10203
- From: Frank Terbeck <frank.terbeck@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: add an mv protection ?
- Date: Wed, 03 May 2006 11:57:01 +0200
- In-reply-to: <44587A71.5080500@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Operating-system: Linux 2.6.16.1 i686
- References: <44587A71.5080500@xxxxxxxxxxxxxxxxxx>
Marc Chantreux <marc.chantreux@xxxxxxxxxxxxxxxxxx>:
> % 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author