
나는 모든 파일을 특정 디렉토리에 다운로드하도록 wget을 얻으려고 노력해 왔습니다. -O 옵션을 시도했지만
/home/user/xml/: 디렉터리입니다.
이것이 내가 지금까지 가지고 있는 것입니다
wget -m --user=user --password=pass -r -l1 --no-parent -A.rss ftp://localhost/public_html/
FTP에서 보조 서버의 특정 디렉터리로 모든 .rss 파일을 다운로드해야 합니다.
답변1
사용-피옵션.
wget -P /home/user/directory_you_want http:url_you_are_downloading_from
자세한 내용은 다음을 참조하세요.스택오버플로우 페이지
답변2
-P 옵션은 모든 파일을 특정 디렉터리에 다운로드했지만 대상 디렉터리 내에 2개의 새 디렉터리를 생성했습니다.
그래서 파일은 /home/user/xml/192.168.1.1/public_html/에 들어갔습니다.
그래서 -P 옵션과 -nd 옵션을 사용하여 시도했는데 필요한 대로 작동했습니다.
최종 코드는 다음과 같습니다
wget -m -nd --user=user --password=password -r -l1 --no-parent -A.rss ftp://localhost/public_html/ -P /home/user/Desktop/xml/