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

Re: Speedup cp command?



> On Tue, Aug 23, 2016 at 03:18:30PM -0500, Richard Owlett wrote:
> > I'm copying Debian distribution DVDs.
> > I used
> >   cp -R /media/cdrom0 /media/richard/myrepository/dvd_1
> > 
> > It gave me what I wanted [*N.B.* I did not want dvd_1.iso]
> > It was SLOW.

Optical media are « SLOW ». You can check for yourself: measure the actual
speed (using for example « iostat 1 », or maybe « df
/media/richard/myrepository/dvd_1; sleep 100; df
/media/richard/myrepository/dvd_1 » and a calculator), and compare to the
official speed of your drive.

> > The man page for rsync suggested that it could do it faster.
> > Can it?

No.

> > If so, what is correct syntax to get the same result as the command above?

« rsync -r » instead of « cp -r » (or -R, they are synonyms for cp but not
for rsync), nothing more. But in this particular case, I would advise -a
instead of -r for both.

Andrew M.A. Cater a écrit :
> Loop mount the DVD
> 
> mount -t iso /media/cdrom0 -o loop /mnt

That does not make any sense. In this situation, /media/cdrom0 is a
directory. You can not do loopback on a directory.

If the data is on an optical medium, it must be read from the optical
medium, at the speed of the optical medium, there is no way around. Even if
you manage to convince the kernel to do loopback on something that is
already a block device, it will not help.

Attachment: signature.asc
Description: Digital signature


Reply to: