차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tech:wget [2018/12/04 08:10] – [사진 받기] V_Ltech:wget [2023/07/23 00:04] (현재) – [사이트 전체 받기] V_L
줄 25: 줄 25:
  
  
 +<file>
   --recursive   --recursive
 +</file>
 Tells wget to recursively download pages, starting from the specified URL. Tells wget to recursively download pages, starting from the specified URL.
 +<file>
   --level=1   --level=1
 +</file>
 Tells wget to stop after one level of recursion. This can be changed to download more deeply, or set to 0 that means “no limit” Tells wget to stop after one level of recursion. This can be changed to download more deeply, or set to 0 that means “no limit”
 +<file>
   --no-clobber   --no-clobber
 +</file>
 Skip downloads that would download to existing files Skip downloads that would download to existing files
 +<file>
   --page-requisites   --page-requisites
 +</file>
 Tells wget to download all the resources (images, css, javascript, ...) that are needed for the page to work. Tells wget to download all the resources (images, css, javascript, ...) that are needed for the page to work.
 +<file>
   --html-extension   --html-extension
 +</file>
 Adds ”.html” extension to downloaded files, with the double purpose of making the browser recognize them as html files and solving naming conflicts for “generated” URLs, when there are no directories with “index.html” but just a framework that responds dynamically with generated pages. Adds ”.html” extension to downloaded files, with the double purpose of making the browser recognize them as html files and solving naming conflicts for “generated” URLs, when there are no directories with “index.html” but just a framework that responds dynamically with generated pages.
 +<file>
   --convert-links   --convert-links
 +</file>
 After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content, such as embedded images, links to style sheets, hyperlinks to non-HTML content, etc. After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content, such as embedded images, links to style sheets, hyperlinks to non-HTML content, etc.
 +<file>
   --no-parent   --no-parent
 +</file>
 Do not ever ascend to the parent directory when retrieving recursively. Do not ever ascend to the parent directory when retrieving recursively.
 +<file>
   --domains=www.example.com   --domains=www.example.com
 +</file>
 Set domains to be followed. DOMAIN-LIST is a comma-separated list of domains. Set domains to be followed. DOMAIN-LIST is a comma-separated list of domains.
  
줄 45: 줄 61:
 Many web servers tend to limit the pages a user can download in a given amount of time, or the user-agents that can access given pages, etc. To avoid such limits, some extra options may be added. Many web servers tend to limit the pages a user can download in a given amount of time, or the user-agents that can access given pages, etc. To avoid such limits, some extra options may be added.
  
 +<file>
   -U "Mozilla/5.0 (X11; U; Linux; en-US; rv:1.9.1.16) Gecko/20110929 Firefox/3.5.16"   -U "Mozilla/5.0 (X11; U; Linux; en-US; rv:1.9.1.16) Gecko/20110929 Firefox/3.5.16"
 +</file>
 Tells wget to use a fake user-agent, to emulate the one of a web browser (in this case, Firefox 3.5 on Linux) Tells wget to use a fake user-agent, to emulate the one of a web browser (in this case, Firefox 3.5 on Linux)
 +<file>
   --wait=3   --wait=3
 +</file>
 Tells wget to wait at least 3 seconds between retrievals. Tells wget to wait at least 3 seconds between retrievals.
 +<file>
   --random-wait   --random-wait
 +</file>
 Tells wget to wait a random time between 0 and double the value specified with –wait between requests. Tells wget to wait a random time between 0 and double the value specified with –wait between requests.
  
 +<file>
   -P prefix   -P prefix
 --directory-prefix=prefix --directory-prefix=prefix
 +</file>
  
 Set directory prefix to prefix.  The directory prefix is the Set directory prefix to prefix.  The directory prefix is the
줄 79: 줄 103:
   --post-data=string   --post-data=string
      
 +  
 +<file>
 +   --recursive: download the entire Web site.
 +   --domains website.org: don't follow links outside website.org.
 +   --no-parent: don't follow links outside the directory tutorials/html/.
 +   --page-requisites: get all the elements that compose the page (images, CSS and so on).
 +   --html-extension: save files with the .html extension.
 +   --convert-links: convert links so that they work locally, off-line.
 +   --restrict-file-names=windows: modify filenames so that they will work in Windows as well.
 +   --no-clobber: don't overwrite any existing files (used in case the download is interrupted and resumed).
 +</file> 
 ====사진 받기==== ====사진 받기====
  
-  wget   -r   -np   --reject   "*.txt"   http://192.168.0.100/images+  wget -r -np --reject "*.txt" http://192.168.0.100/images
  
   * -r은 --recursive를 줄인 것.    * -r은 --recursive를 줄인 것.