있는 위치를 지정하는 방법을 wget?

데릭쉐퍼드와 파일을 다운로드할 수 /tmp/cron_test/. 내 wget 코드는

wget --random-wait -r -p -nd -e robots=off -A".pdf" -U mozilla http://math.stanford.edu/undergrad/

그래서 일부 매개변수입니다 디렉토리에는 지정할 수 있나요?

질문에 대한 의견 (1)
해결책

의 매뉴얼 페이지를:

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

그래서 '' (파선-짧은 형식) 또는 '디렉터리입니다 접미어입니다. /tmp/cron_test/ p 추가해야 합니다 = /tmp/cron_test/ 데이터베이스에구성원을 함장님이요' (긴 형식) 또한 존재하지 않는 경우 디렉토리에는 창조하 받게 됩니다.

해설 (6)
  • O 는 파일의 경로를 지정할 수 있는 옵션이 다운로드할 수 있습니다.
wget  -O /path/to/folder/file.ext

여기서 P 는 파일이 디렉토리에 다운로드하십시오 접두어입니다 것입니다 -

wget  -P /path/to/folder
해설 (4)

Url 을 있는지 확인하기 위해 수정하십시오 있는모든 틀렸다니까 다운로드하십시오. 우선, 다음과 같은 문자를 함께 url '?' 등의 해석되고 해결되었으므로 수 없습니다. 이렇게 하면 cmd 혼란을 줄 수 있는 문자는 # 39 에 동의하고, t 해결되었으므로 aren& 소스 URL 이름으로 파일 이름 틀렸다니까 다운로드하십시오 대상.

예를 들면 다음과 같습니다.

wget "sourceforge.net/projects/ebosse/files/latest/download?source=typ_redirect"

'?' 라는 파일로 다운로드하십시오 소스 = typ_redirect 했다.

알 수 있듯이, url 은 2 일 '또는' wget vmnet 대해 이해할 수 있습니다.

나는 디스크 및 Linux 에서 부트하는 히렌 2.6.1 리소스로 (가져오기의 os 를 사용할 수 없는) 만 있었다. 이 문제를 해결할 수 있는 올바른 구문을 가 ISO 관용으로충만하신 다운로드하십시오 실제 하드 드라이브를 없었다.

wget "(source url)" -O (directory where HD was mounted)/isofile.iso" 

올바른 URL 을 찾아서 어느 시점에서 wget '다운로드' 한 수 그림 파일로 이름이 'index. html' (기본 파일), 계시한하나님께 필요한 정확한 크기 / 다른 파일의 특성을 보여준 정보정의다음 명령:

wget "(source url)"

해당 url 을 한 것은 ',' index. html 로 다운로드 및 소스 파일 올바르고 다운로드하십시오 (,, /kbd&gt ctrl&lt kbd&gt &lt 중지할 수 있습니다 + &lt kbd&gt /kbd&gt z<;;;) 출력 및 변경하십시오 사용하여 파일을:

-O "/filename.extension"

이후 소스 url.

저의 경우는 그 결과 그 아래에 있는 이진 파일을 다운로드 및 저장 ',' 가 ISO 이소피레그리소 마운트이며 있기를 바랍니다

해설 (0)

양반이군요 wget:

  • O 파일
  • 출력 문서를 = 파일
wget "url" -O /tmp/cron_test/
해설 (1)

p&quot " -; 지금 옵션에만 대한 더 많은 관련 정보를 읽어 보십시오.

둘째, np - P / 대상 / 디렉터리 - 재귀 http://url/dir1/dir2 wget -

관련 스니핏 충스러웠으니 맨페이지 편의상:

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

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

   -np
   --no-parent
       Do not ever ascend to the parent directory when retrieving recursively.  This is a useful option, since it guarantees that only the files below a certain hierarchy will be downloaded.
해설 (0)

이 방법을 시도하시겠습니까 -

import os
path = raw_input("enter the url:")
fold = raw_input("enter the folder:")
os.system('wget -r -nd -l1 -P %s --no-parent -A mp3 %s'%(fold, path))
해설 (2)