IT

wget을 사용하여 전체 디렉토리와 하위 디렉토리를 다운로드하는 방법은 무엇입니까?

lottoking 2020. 6. 28. 18:02
반응형

wget을 사용하여 전체 디렉토리와 하위 디렉토리를 다운로드하는 방법은 무엇입니까?


wget해당 프로젝트의 SVN 서버가 더 이상 실행되지 않고 브라우저를 통해서만 파일에 액세스 할 수 있으므로을 사용하여 프로젝트의 파일을 다운로드하려고 합니다. 모든 파일의 기본 URL은 다음과 같습니다.

http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/ *

wget"tzivi"폴더가 루트 폴더이고 그 아래에 여러 파일과 하위 폴더 (최대 2 개 또는 3 개 수준)가있는이 저장소의 모든 파일을 다운로드 하는 방법 (또는 다른 유사한 도구)을 어떻게 사용할 수 있습니까?


쉘에서 이것을 사용할 수 있습니다 :

wget -r --no-parent http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/

매개 변수는 다음과 같습니다.

-r     //recursive Download

--no-parent // Don´t download something from the parent directory

전체 컨텐츠를 다운로드하지 않으려면 다음을 사용할 수 있습니다.

-l1 just download the directory (tzivi in your case)

-l2 download the directory and all level 1 subfolders ('tzivi/something' but not 'tivizi/somthing/foo')  

등등. -l옵션 을 삽입하지 않으면 자동으로 wget사용 -l 5됩니다.

삽입하면 -l 0인터넷 전체를 다운로드 wget하게됩니다 . 왜냐하면 모든 링크를 따라 가기 때문 입니다.


쉘에서 이것을 사용할 수 있습니다.

wget -r -nH --cut-dirs=7 --reject="index.html*" \
      http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/

매개 변수는 다음과 같습니다.

-r recursively download

-nH (--no-host-directories) cuts out hostname 

--cut-dirs=X (cuts out X directories)

명령을 사용

wget -m www.ilanni.com/nexus/content/

wget -r --no-parent URL --user=username --password=password

다운로드 할 사용자 이름과 비밀번호가있는 경우 마지막 두 옵션은 선택 사항입니다. 그렇지 않으면 사용할 필요가 없습니다.

링크 https://www.howtogeek.com/281663/how-to-use-wget-the-ultimate-command-line-downloading-tool/ 에서 더 많은 옵션을 볼 수도 있습니다.


이 명령을 사용할 수도 있습니다.

wget --mirror -pc --convert-links -P ./your-local-dir/ http://www.your-website.com

다운로드하려는 웹 사이트의 정확한 미러를 얻을 수 있도록


이것은 작동합니다 :

wget -m -np -c --no-check-certificate -R "index.html*" "https://the-eye.eu/public/AudioBooks/Edgar%20Allan%20Poe%20-%2"

참고 URL : https://stackoverflow.com/questions/17282915/how-to-download-an-entire-directory-and-subdirectories-using-wget

반응형