#usefule options
To download a single page and all its requisites (even if they exist
on separate websites), and make sure the lot displays properly
locally, this author likes to use a few options in addition to -p:
wget -E -H -k -K -p http:///
-np no parent
-H
--span-hosts
Enable spanning across hosts when doing recursive retrieving.
-A.c download .c file
-E add html extension to cgi/jsp script links
-K
--backup-converted
When converting a file, back up the original version with a .orig
suffix. Affects the behavior of -N.
-k
--convert-links The same as the above, but convert the links in the HTML
files to point to local files, so you can view the
documents off-line:
wget --convert-links -r http://www.gnu.org/ -o gnulog
---restrict-file-names=mode
windows doesn't accept certain file names like <>?
it can replace with certain chars like ? to #
-nc
--noclobber(no overwrite)
With -nc, download the same file will overwritten the old.
With -r -nc, download the same file will avoid overwriting, just use the original copy.
When running Wget without -N, -nc, -r, or p, downloading the same
file in the same directory will result in the original copy of file
being preserved and the second copy being named file.1.
-F
--force-html
When input is read from a file, force it to be treated as an HTML
file. This enables you to retrieve relative links from existing
HTML files on your local disk, by adding some url to
HTML, or using the --base command-line option.
-p
--page-requisites
This option causes Wget to download all the files that are
necessary to properly display a given HTML page. This includes
such things as inlined images, sounds, and referenced stylesheets.
-q
--quiet
Turn off Wget’s output.
-nv
--no-verbose
Turn off verbose without being completely quiet (use -q for that),
which means that error messages and basic information still get
printed.
wget -r -p -l 2 -np -nc -q http://www.cpsc.gov/cpscpub/prerel/prerel.html
Monday, September 28, 2009
wget useful options
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment