Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: the mv trap



On 2007-08-13 07:44:39 +0000, zzapper wrote:
> red face; in fact my mv does report "not a directory".
> My problem is reduced to unintentionally moving a single file to another 
> single file rather than the intended directory.
> 
> MM solves this by suggesting a trailing slash
> 
> $ mv x3 bucket/
> mv: accessing `bucket/': Not a directory

If you fear to forget the trailing slash, you can also write a shell
script/function that checks that the target is a directory, then
executes mv.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author