Jim, On Monday 20 September 2004 11:59, Jim Sabatke wrote:
Randall R Schulz wrote:
Jim,
Wget is very powerful. There are many options, but they're not particularly difficult to understand, so you'd be well advised to familiarize yourself with them. The "--help" output is over 100 lines long.
As I posted, I spent hours reading man, then online manual, and searching google for the answer. This situation isn't covered in any of them that I could find. I think the wget community would be well served by having this type of usage covered by an example.
Here's an excerpt from the manual page: -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- --cut-dirs=number Ignore number directory components. This is useful for getting a fine-grained control over the directory where recursive retrieval will be saved. Take, for example, the directory at ftp://ftp.xemacs.org/pub/xemacs/. If you retrieve it with -r, it will be saved locally under ftp.xemacs.org/pub/xemacs/. While the -nH option can remove the ftp.xemacs.org/ part, you are still stuck with pub/xemacs. This is where --cut-dirs comes in handy; it makes Wget not ‘‘see'' number remote directory components. Here are several examples of how --cut-dirs option works. No options -> ftp.xemacs.org/pub/xemacs/ -nH -> pub/xemacs/ -nH --cut-dirs=1 -> xemacs/ -nH --cut-dirs=2 -> . --cut-dirs=1 -> ftp.xemacs.org/xemacs/ ... If you just want to get rid of the directory structure, this option is similar to a combination of -nd and -P. However, unlike -nd, --cut-dirs does not lose with subdirectories---for instance, with -nH --cut-dirs=1, a beta/ subdirectory will be placed to xemacs/beta, as one would expect. -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- To me, wget ain't rocket science. And if you want to get hired for computer work, you're surely going to have to be able to figure this sort of thing out under your own intellectual power, it seems to me. Randall Schulz