-
인터넷에 있는 자료를 다운 받을때환경구축 2023. 3. 19. 02:17
# Download/unzip images and labels d='../datasets' # unzip directory url=https://github.com/ultralytics/yolov5/releases/download/v1.0/ f='coco128.zip' # or 'coco128-segments.zip', 68 MB echo 'Downloading' $url$f ' ...' curl -L $url$f -o $f -# && unzip -q $f -d $d && rm $f & wait # finish background tasks
상당히 좋은 예라서 적어 놓는다.
내가 저장하고 싶은 폴더 = d
받고 싶은 주소 = url
curl -L 에서 -L 의미 redirction 의미함.
출처 : https://nitw.tistory.com/131
CURL
웹 서버에 대한 배치작업이 필요한 경우가 있다. 이런 작업에 웹 브라우저를 사용할 수 없는 노릇이니 CLI 도구를 사용해야 한다. curl은 가장 널리 사용하는 인터넷 데이터 전송을 위한 도구다.명
nitw.tistory.com
unzip -q : quiet operation 이라고 나오는데 중요한 옵션같지는 않다.
즉 프린트 하지 않는다는 뜻임.
perform operations quietly (-qq = even quieter). Ordinarily unzip prints the names of the files it's extracting or testing, the extraction methods, any file or zipfile comments that may be stored in the archive, and possibly a summary when finished with each archive. The -q[q] options suppress the printing of some or all of these messages.
다운 받고
curl -L $url$f -o $f -#
-# 옵션이 있어서 진행상황도 알 수 있음.
압축 풀고unzip -q $f -d $d
다음부터 나도 위 방식으로 코드를 작성해야겠다.
반응형'환경구축' 카테고리의 다른 글
Terminal로 nvidia-driver, cuda, cudnn설치하기 (0) 2023.07.08 mAP(Mean Average Precision) (0) 2023.03.19 환경 구축 category 의 목적.... (0) 2023.02.11 conda 설치 (0) 2023.02.11 nvidia-driver, cuda-driver,pytorch 설치 (0) 2023.02.11