sourcetip

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

fileupload 2023. 5. 23. 22:20
반응형

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

등등.no를 삽입하는 경우-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 --no-clobber --convert-links --random-wait -r -p --level 1 -E -e robots=off -U mozilla http://base.site/dir/

매력적으로 작동했습니다.

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 -m www.ilanni.com/nexus/content/

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

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

다운로드할 웹 사이트의 정확한 미러를 얻을 수 있습니다.

다음 작업 코드(30-08-1987)를 사용해 보십시오.

!wget --no-clobber --convert-links --random-wait -r -p --level 1 -E -e robots=off --adjust-extension -U mozilla "yourweb directory with in quotations"

이걸 작동시킬 수가 없어요.무슨 일이 있어도 그냥 http 파일이 있어요

단순히 디렉터리를 다운로드하기 위해 이 명령을 보는 것입니까?더 좋은 방법이 있을 것입니다. wget은 완전히 실패하지 않는 한 이 작업에 잘못된 도구인 것 같습니다.

효과:

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

이것은 도움이 될 것입니다.

wget -m -np -c --level 0 --no-check-certificate -R"index.html*"http://www.your-websitepage.com/dir

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

반응형