[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for "mv -s" option

From: Paul Eggert
Subject: Re: Patch for "mv -s" option
Date: Fri, 05 Nov 2004 07:47:05 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Brendan Byrd/SineSwiper <address@hidden> writes:

> I hashed out a patch for mv which is more or less the opposite of the
> "--symbolic-link" option for cp.  Instead of creating symlinks on the
> destination before the copy, it creates symlinks on the source after
> the move.

Before we talk about the patch itself (which was not enclosed in your
email, by the way), could you give an illustration why such an option
is useful?  Often the most important part of such changes is the
documentation, and the illustration should be put there.

> Also, I have a question about how files are moved.  Currently, all
> files are copied to a new diskspace, and then the old diskspace is
> removed. Why not just create a hardlink

Normally "mv" uses the "rename" system call, which is roughly the
equivalent of "link" followed by "unlink", and is quite efficient
as you suggest.  However, if the "rename" fails because the new
location is in a different filesystem, then it needs to do the copy.

Did you observe "mv" doing a copy when a "rename" would have sufficed?
If so, please tell us how to reproduce the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]