Monday, December 22, 2008

คำสั่ง wget ที่ใช้บ่อย

#wget [URL]

#wget --limit-rate=[x]k or m [URL] ;in bytes, kilo(k) bytes or mega(m) bytes.

#wget --http-user=user --http-passwd=password [URL]

#wget --ftp-user=USER --ftp-password=PASS [URL] ;set ftp password to PASS.

#wget -c [URL] ;Continue getting a partially-downloaded file.

#wget -r -l 1 -A [suffixes (separate with comma)] [URL]
-r
--recursive
Turn on recursive retrieving.
-l depth
--level=depth
Specify recursion maximum depth level depth. The default maximum depth is 5.
-A acclist --accept acclist
-R
rejlist --reject rejlist
Specify comma-separated lists of file name suffixes or patterns to accept or reject.


#wget -nd -r -l 1 -A [suffixes (separate with comma)] [URL]

-nd
--no-directories
Do not create a hierarchy of directories when retrieving recursively. With this option turned on, all files will get saved to the current directory, without clobbering (if a name shows up more than once, the filenames will get extensions .n).
Ref:
about wget command

No comments: