Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 14 years ago.
Improve this question
I'm attempting to use wget to recursively grab only the .jpg files from a particular website, with a view to creating an amusing screensaver for myself. Not such a lofty goal really.
The problem is that the pictures are hosted elsewhere (mfrost.typepad.com), not on the main domain of the website (www.cuteoverload.com).
I have tried using "-D" to specified the allowed domains, but sadly no cute jpgs have been forthcoming. How could I alter the line below to make this work?
wget -r -l2 -np -w1 -D www.cuteoverload.com,mfrost.typepad.com -A.jpg -R.html.php.gif www.cuteoverload.com/
Thanks.
An examination of wget's man page[1] says this about -D:
Set domains to be followed. domain-list is a comma-separated list of domains. Note that it does not turn on -H.
This advisory about -H looks interesting:
Enable spanning across hosts when doing recursive retrieving.
So you need merely to add the -H flag to your invocation.
(Having done this, looks like all the images are restricted to mfrost.typepad.com/cute_overload/images/2008/12/07 and mfrost.typepad.com/cute_overload/images/2008/12/08).
--
[1] Although wget's primary reference manual is in info format.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Used to check if the index (indices) exists or not. For example:
curl -XHEAD -i 'http://localhost:9200/twitter'
The HTTP status code indicates if the index exists or not. A 404 means it does not exist, and 200 means it does.
What is the use of -i option in above example?
This is related to cURL, I suppose. So it means it should be written in documentation:
Different protocols provide different ways of getting detailed
information about specific files/documents. To get curl to show
detailed information about a single file, you should use -I/--head
option. It displays all available info on a single file for HTTP and
FTP. The HTTP information is a lot more extensive.
Or alternatively in here:
-i, --include
(HTTP) Include the HTTP-header in the output. The HTTP-header includes
things like server-name, date of the document, HTTP-version and
more...
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
When creating a netcat-like program how do I get that file onto a server? It seemed like the reason for creating a netcat-like program was to be able to use it to run commands, get files and connect to ports.
So it seems like it's necessary to have it on the server in order to put it on the server?
I'm probably just really confused.
You'd use another program to load it initially. For example, you might ssh in.
It is also possible that you'd have physical access to the server and could install the first file transfer program manually, or as part of the intial OS install.
Not all interactions have to be done remotely. Otherwise, your intuition would be right -- we'd have a chicken and egg problem.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
So right now I am trying to open a folder on my local host and cannot because every time I try to access localhost/myfolder I get a you don't have permissions error. I tried copying and pasting this said folder to Library/WebServer/Documents and the even weirder thing is that other folder I copy do show up in localhost but this one does not. All this folder has is some html in it. Does anybody have any idea why this could be happening? Thanks!
You might not have permissions to read the document.
Try:
chmod -R 755 Library/WebServer/Documents
This will give read/write/execute permissions to the user. read/write to the group and read/write to other. See https://en.wikipedia.org/wiki/Chmod for more info on chmod.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
How wget all images from site when these images aren't stored on the same domain?
I recommend you to take a look at this link
it should be something like this ;
wget -r -A.jpg http://url-to-webpage-with-images/
Another way that I did earlier,
1) get html source of documents
2) parse links
3) save the links in a .txt file
4) after that use wget -i file_name.txt
You can use this generic class I wrote. It is easy to understand. Just look at Test.java how to use the class.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How do I access specific sections of man pages?
Put the section number in front of the item you want to reference. For example, to access the sysctl function from the library section, you can write:
man 3 sysctl
and to access the sysctl tool from the system administrator's section, you would write:
man 8 sysctl
To add to what Jason said: if you're not sure what section something is in, you can also see all of the man pages for a given topic by typing
man -a topic
This is useful for topics such as printf, for which there is both a command and a C function that do similar things.
use the -s flag, for example:
man -s 2 read
you might like to look at
man intro
to get an idea of what's where.
HTH.
cheers,
Rob