[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

using 'mv' instead of 'cp' to transfer directories to other partitions or disks

In another thread Re: shrinking reiserfs partitions, filesystems
Roberto Ragusa responded

Do not forget another option: copy everything somewhere else
(external USB drive or something...), destroy the partition,
recreate it smaller, format and copy back.

In this way you get an implicit perfect defrag of your data,<<<<<<<<<<
which could be more or less useful, depending on the current
fragmentation of your filesystem.

my question: isn't it true that use of 'mv' is much faster than 'cp' or rsync?
ie to "copy everything somewhere else" 
"mv everything somewhere else"  
instead of
"..and copy back"
".. mv back"

Are there gotchas using 'mv' instead of the various copy tools?
more fragmentation perhaps?

I made one test case here  to test mv
I first made a copy of /lib  to /libfc5copy
and then tested mv on the latter to move it to my external usb

mv libfc5copy /media/disk-1/mvlibfc5copy

this seemed to complete in only a second or two.
Of course this is only useful if you want to erase the original.

thanks for any advice

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]