The only real way to answer this is to look through the source code. Implementations could vary.
In particular, I assume by
mv you mean the one provided by GNU Coreutils.
I'm not confident that I understand all the nuances in their
mv code, but I can note these facts:
src/mv.c there is a function
do_move(const char *source, const char *dest, const struct cp_options *x) which is presumably the main driver for
mv. That function invokes another function called
copy function invoked by
do_move is basically a wrapper to another function called
- At the top of the
copy_internal function it attempts to
stat the source file. If that fails, it bails out without doing anything.
Therefore, I think it is safe to answer:
mv a non-existent file will not affect the destination until various checks have passed.