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

jackson byers byersjab at gmail.com
Thu Apr 2 02:42:45 UTC 2009


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"
instead
"mv everything somewhere else"
and
instead of
"..and copy back"
do
".. 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
Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20090401/ac73f901/attachment-0001.html 


More information about the users mailing list