Look at the source for mv and see what it's test is.... I submitted a patch to cvs once that fixed an error that involved these semantics - oh because cvs was doing a rename when it should have been doing a move. Rename fails across filesystems, move works. It might be something as simple as 'if the rename system call fails - do a copy/delete". In point of fact, I think there is a rename command but I'm not sure if it is a literal wrapper for the rename syscall and has the same symantics or not... Just giving ideas/spitballing. -Rob On Tue, Nov 16, 2010 at 10:22 AM, gregwm <tclugl at whitleymott.net> wrote: > can anyone show me a bash test to put before mv that will tell whether mv > will do a simple rename or a copy and delete? for example for mv into a > --bind mount, df reports both locations as within the same fs, yet mv will > copy and delete. the best test I can think of would create a file, mv and > see what happens. can anyone concoct an accurate test that doesn't need to > create a test file? (or perhaps reveal an mv alternative..) > > _______________________________________________ > 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/20101116/8d2d9d71/attachment-0001.htm