아이공의 AI 공부 도전기

[Colab] 간편 명령어 알아보기

 

     

 

 

 

 

zip, unzip 자세한 과정

https://aigong.tistory.com/201

 

[CoLab] 파일 zip, unzip하는 법

[CoLab] 파일 zip, unzip하는 법 zip하는 법 1. 자신의 위치를 파악합니다.(아마 '/content'에 있으실 것입니다.) !pwd 2. zip하고자 하는 파일 경로를 알아냅니다. 이 때 왼쪽에 있는 폴더 모양을 클릭하여

aigong.tistory.com

 

zip : zip 압축하기

 

# !zip -r 압축하고자 하는 dir path/~.zip 저장하고자 하는 dir path

!zip -r /content/drive/MyDrive/data/name.zip /content/drive/MyDrive/data

 

unzip : 압축 파일 풀기

 

# !unzip -qq "zip 파일이 저장된 path/~.zip" -d "저장하고자 하는 dir path"

!unzip -qq "/content/drive/MyDrive/data/name.zip" -d "/content/drive/MyDrive/data"

 

rm : 파일, dir 제거

 

# !rm -rf 제거하고자 하는 파일 or dir

!rm -rf /content/drive/MyDrive/data

 

pwd : 현재 파일 경로 알기

 

# 현재 파일 경로를 알고싶을 때 
!pwd

 

ls : 지정 위치 파일 및 dir 알기

 

# !ls 무엇이 있는지 알고자 하는 path

!ls /content/drive/MyDrive/data

 

wget : url로부터 파일 얻기

 

(위) 대문자 P (아래) 소문자 p

 

# !wget -P 저장하고자 하는 Path 다운받고자 하는 URL
!wget -P /content/drive/MyDrive/pretrain https://~

# !wget 다운받고자 하는 URL -p 저장하고자 하는 Path
!wget https://~ -p /content/drive/MyDrive/pretrain

 

https://stackoverflow.com/questions/55755332/how-to-use-wget-to-download-in-certain-directory

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

00000 

공유하기

facebook twitter kakaoTalk kakaostory naver band
loading