Does mv do a lot of work (not a joke)?
Kernel 188.8.131.52, Slackware 12.0
Suppose I use the mv command to move certain subtree within the tree rooted at /. May I expect only a very small quantity of sectors will be involved in the process? Or, on the contrary, it is probable that a large amount of data will be transfered from sector to sector? Assume ext2.
If any of you is wondering why such a theoretical question, I am ready to translate it to practical terms: I have just created a directory called /home/john/mic2 which I expect to grow until reaching over a thousand nodes (nodes in the sense given to this word when studying lattices, trees and the like). But maybe later I will change its name to /home/john/mic1 for which, I think, mv is the usual tool in Linux.
mic2 is just a file. As such, there is a set of sectors associated with it. When I rename, these sectors will be left vacant and a new set of sectors will be written. Or maybe the same set shall be rewritten. And is that all? Remember mic2 is by now about a thousand nodes "large". Any hint will be welcome.
P.S.: If this does not belong to the forum, please tell me so or press the REPORT button and ask for the thread to be moved.
Last edited by stf92; 11-27-2010 at 07:24 PM.