2013-07-14 10 views

risposta

30

Utilizzare i

--reject jpg,png --accept html 

opzioni per escludere/includere file con determinate estensioni, vedere http://www.gnu.org/software/wget/manual/wget.html#Recursive-Accept_002fReject-Options.

modelli put con caratteri jolly tra virgolette, altrimenti la shell li si espanderà, vedere http://www.gnu.org/software/wget/manual/wget.html#Types-of-Files

+0

Questa domanda è mezzo duplicata a http://superuser.com/questions/487198/exclude-list-of-specific-files-in-wget – mvw

+0

grazie a @mvw che funziona ora .. – Nisar

+0

Quindi non è necessario ' * .jpg', 'jpg' è abbastanza? – CMCDragonkai

6
# -r : recursive  
# -nH : Disable generation of host-prefixed directories 
# -nd : all files will get saved to the current directory 
# -np : Do not ever ascend to the parent directory when retrieving recursively. 
# -R : don't download files with this files pattern 
# -A : get only *.html files (for this case) 

Per esempio:

wget -r -nH -nd -np -A "*.html" -R *.gz, *.tar http://www1.ncdc.noaa.gov/pub/data/noaa/1990/ 
+1

Perché -1 a quella risposta? Non sono pubblicato, ma non vedo perché è downvoted. –

+0

non ho idea, stavo cercando l'opzione -nd che non è elencata in 'Recursive Retrieval Options' nel manuale, quindi upvoted – noonex

+1

Credo che '-A * .html' sia un errore - verrà espanso dalla shell . Dovrei essere '-A" * .html "'. – Alexey

Problemi correlati