Click to See Complete Forum and Search --> : Anyone looking for KDE 3.2.1 for Mdk?


pickarooney
03-20-2004, 08:02 AM
I found some here (http://richardlinux.net/Kdelibs.html).
Trying to get them via wget, but not sure how to ignore dir structure and only get *.rpm files. A clue?

mdwatts
03-20-2004, 10:18 AM
wget *.rpm (would that work?)

or from the wget manpage


Directory Options


-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).

-x
--force-directories
The opposite of -nd---create a hierarchy of directories, even if one would not have been created oth_
erwise. E.g. wget -x http://fly.srk.fer.hr/robots.txt will save the downloaded file to
fly.srk.fer.hr/robots.txt.

-nH
--no-host-directories
Disable generation of host-prefixed directories. By default, invoking Wget with -r
http://fly.srk.fer.hr/ will create a structure of directories beginning with fly.srk.fer.hr/. This
option disables such behavior.

--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.

-P prefix
--directory-prefix=prefix
Set directory prefix to prefix. The directory prefix is the directory where all other files and sub_
directories will be saved to, i.e. the top of the retrieval tree. The default is . (the current
directory).

pickarooney
03-20-2004, 01:31 PM
It doesn't like the wildcards, but there is a -a switch for filetypes. I couldn't get it to work quickly, so saved the webpage as text and grep/cut the relevant lines out.

Got all the packages, but several of them seem to be corrupted, so if anyone is trying to install these, check them first before removing older packages.

mdwatts
03-20-2004, 01:42 PM
Originally posted by pickarooney
It doesn't like the wildcards.

Would this work (from the wget manpage)


You want to download all the GIFs from a directory on an HTTP server. You tried wget
http://www.server.com/dir/*.gif, but that didn't work because HTTP retrieval does not support glob_
bing. In that case, use:

wget -r -l1 --no-parent -A.gif http://www.server.com/dir/

More verbose, but the effect is the same. -r -l1 means to retrieve recursively, with maximum depth
of 1. --no-parent means that references to the parent directory are ignored, and -A.gif means to
download only the GIF files. -A "*.gif" would have worked too.

pickarooney
03-20-2004, 01:53 PM
Yes, with one minor modification:

wget -r -l1 --no-parent --no-directories -A.rpm http://richardlinux.net/files/9_2/KDE32/arts/

That's good to know for the next time, cheers.

The paragraph you quoted with the usage example of -A.gif doesn't appear in my man page. What would be the reason for that?

mdwatts
03-20-2004, 02:52 PM
Originally posted by pickarooney

The paragraph you quoted with the usage example of -A.gif doesn't appear in my man page. What would be the reason for that?

You must be using wget lite. :D

Near the bottom in the Advanced Usage section?

JohnT
03-26-2004, 04:43 PM
You must be using wget lite. :D :D :D