0

Hello I've been trying to find the correct solution to download wildcard files using wget - I used to have nexus api calls to download the latest files, but unfortunately I have to use pattern matching now that Artifactory does not support this feature.

wget -r --no-parent -l1 -A '*-config.zip' -nd "https://artifactory.com/my-repo/artifacts/configs/version-1.6.9/"

Which I am trying to get config.zip which is actually named "version-1.6.9.20190313-1-config.zip"

The query gives me the correct file, however, it also gives a extra temp files that are not needed. Especially when I need to rename the zip into version-1.6.9.zip with -O version-1.6.9.zip. But due to the extra stuff, the output zip is corrupted, wont unzip correctly. Anyone has any idea?

HTTP request sent, awaiting response... 200 OK
Length: 1119 (1.1K) [text/html]
Saving to: ‘index.html.tmp.2’

index.html.tmp.2                                   100%[================================================================================================================>]   1.09K  --.-KB/s    in 0s

2019-03-14 14:55:39 (76.2 MB/s) - ‘index.html.tmp.2’ saved [1119/1119]

Loading robots.txt; please ignore errors.
--2019-03-14 14:55:39--  https://artifactory.com/robots.txt
Reusing existing connection to artifactory.com:443.
HTTP request sent, awaiting response... 404 Not Found
2019-03-14 14:55:39 ERROR 404: Not Found.

Removing index.html.tmp.2 since it should be rejected.

--2019-03-14 14:55:39--  https://artifactory.com/my-repo/artifacts/configs/version-1.6.9/version-1.6.9.20190313-1-config.zip
Reusing existing connection to artifactory:443.
HTTP request sent, awaiting response... 200 OK
Length: 870745 (850K) [application/zip]
Saving to: ‘version-1.6.9.20190313-1-config.zip’

version-1.6.9.20190313-1-con 100%[================================================================================================================>] 850.34K  3.31MB/s    in 0.3s

2019-03-14 14:55:39 (3.31 MB/s) - ‘version-1.6.9.20190313-1-config.zip’ saved [870745/870745]

FINISHED --2019-03-14 14:55:39--
Total wall clock time: 0.8s
Downloaded: 2 files, 851K in 0.3s (3.31 MB/s)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.