Mailinglist Archive: opensuse (621 mails)

< Previous Next >
[opensuse] Re: Mirroring some files locally from a repository
10.06.2019 19:42, Carlos E. R. пишет:
Hi,

I copy or mirror the 15.1 kernel and other files locally. I use:

#!/bin/bash
wget -r -l1 --no-parent -nd -A "kernel*rpm" -A "nfs-kernel*rpm" -A
"virtualbox*rpm"
"http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/";
wget -r -l1 --no-parent -nd -A "kernel*rpm" -A "virtualbox*rpm"
"http://download.opensuse.org/distribution/leap/15.1/repo/oss/noarch/";


I see this in the output:


--2019-06-10 18:33:55--
http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm
Connecting to download.opensuse.org
(download.opensuse.org)|195.135.221.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8040856 (7,7M) [application/x-rpm]
Saving to: ‘kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp’

kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm
100%[=============================================================================================================>]
7,67M 1,63MB/s in 5,3s

2019-06-10 18:34:00 (1,46 MB/s) -
‘kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp’ saved
[8040856/8040856]

Removing kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp since it
should be rejected.



So first it downloads that file (slowly sometimes), then removes it, probably
because there is already a local copy.

-nd says to save multiple file versions with additional suffix and -A
says to throw away anything that does not end with ".rpm".



How could I improve my download command line so that it doesn't download
things that it is going to delete later, wasting time?



You probably want --no-clobber or --continue.

< Previous Next >
Follow Ups
References