You'll have to explain to me how a rename (which by definition is a change
in place and so doesn't change directory structures) could possibly launch
into a copy?


On Wed, Jul 16, 2014 at 11:57 AM, gregrwm <tclug1 at whitleymott.net> wrote:

> @david:  sounds like you've never been bitten by intending a simple
> rename or move presumably within a filesystem and seeing mv instead
> launch into copying.  if i want a copy i'll use cp.  and i'll have a
> look before i rm any original.  those safety checks you refer to are
> almost entirely around the copy, which i don't even want.  rhel rename
> comes with util-linux-ng, ubuntu rename comes packaged with perl,
> neither manpage has the WARNING you mention.  reads like the author
> had something ominous in mind but they don't say what.  would rename
> consent to lose a directory within it's children?  you mean to suggest
> mv protects you in some important way from something rename might do?
> my understanding of mv is if rename(2) succeeds, it's done, but if
> not, well that's when the trouble begins..
>
> @munir:  and there is no reliable test for "same filesystem".  even
> /proc/mounts is not always reliable, eg with persistence ala
> overlayfs, or if /proc itself is unavailable, eg in a chroot
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20140716/2465f43d/attachment.html>