I'm a graduate student with access to a research group Linux cluster at my university. Over the years, I have accumulated many directories -- I guess "folders" is Windows/Mac terminology? -- in my home directory (
~). When I'm working on a new simulation, I create a new directory in my home directory using
mkdir and then run the simulation in that directory.
But over time, I have accumulated many such directories in my home directory. Now I want to move some of the directories into subdirectory. For example, I might want to create a new directory called
simulations1_10 and then move the directories
simulation2, ... ,
simulation10 into that directory -- so that the root of my home directory is more organized.
To do this, I could use
cp. For example:
cp -r simulation1/ simulations1_10/
would copy the directory
simulation1 (and all its contents) to the directory
simulations1_10. I could then remove
But, my transfers aren't crossing filesystem boundaries, so
mv is much faster than
mv of course also allows me to avoid the remove step.) For example:
mv simulation1/ simulations1_10/
My question is, are there any dangers in using
I think that one danger is that if
mv is interrupted (due to power failure, user pressing Ctrl+C, etc) during a transfer, the file might become corrupted in both the source and the destination. Is this correct?
Also, if I use
mv a lot, is there a chance that the "inode database" will be updated too often, causing disk fragmentation or other hard drive/filesystem problems?