Bill Landry wrote: > Dennis Peterson wrote: >> Bill Landry wrote: >> >>> I have read that standards since POSIX.1-1988 onwards have imposed >>> atomicity requirements on rename (mv) that effectively require it to be >>> a system call. The Open Group Base Specifications Issue 7 states: >>> >>> "This rename() function is equivalent for regular files to that defined >>> by the ISO C standard. Its inclusion here expands that definition to >>> include actions on directories and specifies behavior when the new >>> parameter names a file that already exists. That specification requires >>> that the action of the function be atomic." >>> >>> For reference, see: >>> >>> http://www.opengroup.org/onlinepubs/9699919799/functions/rename.html >>> >>> So why not just use mv, since mv is simply a rename (see man rename and >>> man mv). >> Between file systems? That's a good trick. > > You never claimed to be moving file between file systems. I don't think > that most 3rd party signature users are moving files between file > systems once they have download and tested the files, although I > certainly could be wrong.
It doesn't matter - I use rsync in these situations because all moves are atomic, all the time. I have a mail server farm that includes production and dev systems, and NFS is used to access a large ZFS file system to redistribute this stuff. There is another reason to use rsync even within a file system - when you use rsync to dl files from the internet it is a big advantage to preserve the previous version as you then only exchange the changed records (Sane Security, for example). Particularly if you are moving text files that change only at the end of the file (unsorted). If I were to do a move I'd not have that advantage unless I made a copy and moved it and don't you think that's going a bit far? dp _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml