On filesystems like UFS, blocks are allocated, if possible, from the same cylinder group as the directory the file was created in. These newly-allocated blocks may or may not be the same ones that were just freed. Then, if the mv requires copying (a opposed to just moving directory entries), new blocks will be allocated as mv writes. Otherwise, the blocks will generally (it depends on the filesystem type) be placed on a free list. If there are additional hard links to old_file, the blocks will remain unchanged in those remaining links. None of those three examples will overwrite the physical data blocks of old_file or existing_file, except by chance. The answer is "Probably yes, but it depends on the filesystem type, and timing."
0 Comments
Leave a Reply. |