colab에서 데이터를 준비하는 필수 명령어 wget, gunzip, unzip, tar xf,

!wget (url) 하면 해당 url의 파일을 다운로드 받는다

 

etc-image-0

 

 

 

.tar.gz 형태로 압축이 되어있는데, gz 형태의 압축은 !gunzip으로 압축해제가능

 

!gunzip (파일명) 하면 해당 파일의 gz압축을 푼다

 

원래 notMNIST_large.tar.gz가 notMNIST_larget.tar로 바뀜

 

 

etc-image-1

 

 

https://unix.stackexchange.com/questions/48690/whats-the-difference-between-gunzip-and-unzip

 

What's the difference between gunzip and unzip?

What is the difference between gunzip and unzip? Tried to search but couldn't find anything relevant with this.

unix.stackexchange.com

 

 

참고로 !unzip은 *zip 파일을 압축해제할 때 쓴다

 

그리고 마지막으로 notMNIST_large.tar로 tar도 압축파일이다.

 

!tar -xf (파일명) 하면 tar 압축을 푼다

 

etc-image-2

 

 

728x90