[TIP] github에서 특정 파일 다운로드 :: 행복한 프로그래머

posted by 쁘로그램어 2017. 12. 18. 15:39

가끔 github에서 특정 파일만 다운로드 하고 싶은 경우가 생긴다.

wget, curl 명령어를 사용하여, URL뒤에 ?raw=true를 입력하면 된다.


# wget을 사용하는 경우

$ wget -O flannel.yml https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml?raw=true


# curl을 사용하는 경우

$ curl -LJ -o flannelyml https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml?raw=true


git archive 명령으로도 특정 파일만 다운로드가 되는데 더 복잡한거 같다ㅜ

(구글 검색: git download single file from repository)


더 좋은 방법이 있다면 알려주세요^^


■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

저는 IT 기술에 대해 관심이 많고, 기술적인 토론하는 것을 매우 좋아합니다^^

github following 해주시면 정말로 감사하겠습니다^^

github: https://github.com/jhhwang4195


어떠한 댓글이든 환영합니다^^

댓글 좀 달아주세요^^ (구걸 모드) 

■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■


이 글이 도움이 되셨다면 아래에 있는 "♡공감" 버튼을 클릭해주세요