Google Colab을 시작하려면
Google Drive에 들어간 후
새로만들기 -> 더보기 -> Google Colaboratory
을 누르면 실행된다.
Ctrl + M, M : 마크다운
drive.mount('/content/mountdrive')
입력하면 URL 링크가 출력된다.
이 링크를 눌러 구글에 로그인을 한 후
코드를 Ctrl + c 하고 Ctrl + V 을 하면 마운트다 된 것을 볼 수 있다.
📌 마운트 하기전
!ls
👉 결과
sample_data
📌 마운트 하고 난 후
ls
👉 결과
mountdrive/ sample_data/
cd mountdrive/
👉 결과
/content/mountdrive
ls
👉 결과
MyDrive/
cd My\ Drive
👉 결과
/content/mountdrive/My Drive
cd hojun
구글 드라이브에 hojun 파일이 생성되었다.
👉 결과
/content/mountdrive/My Drive/hojun
mkdir test
구글 드라이브에 hojun>test 파일이 생성되었다.