Randall R Schulz wrote:
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
That's an idiotic reply. Who would know that --cut-dirs would have anything to do with the URL mentioned? I read through everything you posted and still don't get the reference. What on earth does that have to do with www.abc.com?something=nothing type structures? I still have no idea why I want to get rid of a directory structure. As I originally said, I didn't understand the URL structure for the get. I couldn't find doc's on it. I still have no idea what the '?' is for. Sometimes it's very easy when you have working knowledge of an area that is helpful, and competely obsucre if you don't. I once made a very good living from solvng difficult problems, although my area is really project management. Some things just require assistance. Perhaps your bullying should convince me to slit my wrists and get it over with. The reason I'm not working is because of severe depression. I'm desperately (yes, I am desperate) trying to recover from that by doing things to spur me in a positive direction. In the past couple days I've compiled, installed and configured gnome 2.8 and the latest abiword. That isn't easy for most people, and I did it without asking anyone a thing.