I am struggling with wget refusing apparently to honor the --no-parent or -np options.   Steps to repeat the issue:

# mkdir -p /usr/local/bin/rpitx/signals
# cd /usr/local/bin/rpitx/signals
# wget -r -np -R index.* http://infrastructure.dd.org/repository/infrastructure/usr/local/bin/rpitx/signals/

What I get is the entire directory structure copied.   The result is...

# pwd
/usr/local/bin/rpitx/signals
# tree
.
└── infrastructure.dd.org
    └── repository
        └── infrastructure
            └── usr
                └── local
                    └── bin
                        └── rpitx
                            └── signals
                                ├── Casitas
                                │   ├── Fast.iq
                                │   ├── Light.iq
                                │   ├── Medium.iq
                                │   ├── Off.iq
                                │   ├── Reverse.iq
                                │   └── Slow.iq
                                ├── Great Hall
                                │   ├── Fast.iq
                                │   ├── Light.iq
                                │   ├── Medium.iq
                                │   ├── Off.iq
                                │   ├── Reverse.iq
                                │   └── Slow.iq
                                ├── Great Room
                                │   ├── Fast.iq
                                │   ├── Light.iq
                                │   ├── Medium.iq
                                │   ├── Off.iq
                                │   ├── Reverse.iq
                                │   └── Slow.iq
                                ├── Master Bath
                                │   ├── Fast.iq
                                │   ├── Light.iq
                                │   ├── Medium.iq
                                │   ├── Off.iq
                                │   └── Slow.iq
                                └── Master Room
                                    ├── Fast.iq
                                    ├── Light.iq
                                    ├── Medium.iq
                                    ├── Off.iq
                                    ├── Reverse.iq
                                    └── Slow.iq

The desired result is this...

# pwd
/usr/local/bin/rpitx/signals
# tree
.
├── Casitas
│   ├── Fast.iq
│   ├── Light.iq
│   ├── Medium.iq
│   ├── Off.iq
│   ├── Reverse.iq
│   └── Slow.iq
├── Great Hall
│   ├── Fast.iq
│   ├── Light.iq
│   ├── Medium.iq
│   ├── Off.iq
│   ├── Reverse.iq
│   └── Slow.iq
├── Great Room
│   ├── Fast.iq
│   ├── Light.iq
│   ├── Medium.iq
│   ├── Off.iq
│   ├── Reverse.iq
│   └── Slow.iq
├── Master Bath
│   ├── Fast.iq
│   ├── Light.iq
│   ├── Medium.iq
│   ├── Off.iq
│   └── Slow.iq
└── Master Room
    ├── Fast.iq
    ├── Light.iq
    ├── Medium.iq
    ├── Off.iq
    ├── Reverse.iq
    └── Slow.iq

Version of wget is 1.21, and happens to be on Debian 11 (bullseye).  The files desired are hosted on an apache2 web server.  Using long or short options does not address the issue at all.  I have seen 100s of examples on google stating that --no-parent or -np SHOULD stop creating of the parent directory structure, but as above shows this is still happening.  Any help greatly appreciated.  Also, I am NOT using -l or cut dirs options BECAUSE I can't predict the sub directory structure, it may change over time, including ALL sub-directories that may exist is desired.  I search the entire system, no .wgetrc file appears to exist.  The /etc/wgetrc file has NO settings enabled, entire file is commented out.

I tried the -d option but I can't seem to capture its output to a file?  It was way to long to cut and past here.

-JnK


Reply via email to