<jupyter_start><jupyter_text>**File handling in Google Colab**  Mounting google drive into Colab<jupyter_code>from google.colab import drive
drive.mount('/content/gdrive/',force_remount = True)<jupyter_output>Mounted at /content/gdrive/<jupyter_text>List content of directory<jupyter_code>!ls
!ls -l<jupyter_output>total 16
-rw-r--r-- 1 root root   26 Nov  8 13:06 data.txt
drwx------ 5 root root 4096 Nov  8 13:03 gdrive
drwxr-xr-x 1 root root 4096 Nov  1 13:35 sample_data
drwxr-xr-x 2 root root 4096 Nov  8 13:05 sample_folder<jupyter_text>Create a directory<jupyter_code>mkdir sample_folder
ls<jupyter_output>data.txt  [0m[01;34mgdrive[0m/  [01;34msample_data[0m/  [01;34msample_folder[0m/<jupyter_text>Create files<jupyter_code>!echo "The sample data to check." > data.txt
ls<jupyter_output>data.txt  [0m[01;34mgdrive[0m/  [01;34msample_data[0m/  [01;34msample_folder[0m/<jupyter_text>Downloading files from internet<jupyter_code>! wget https://github.com/Amit32624/dbpedia_prj/blob/master/med_devs_clean_data.csv
ls -l<jupyter_output>total 644
-rw-r--r-- 1 root root     26 Nov  8 13:16 data.txt
drwx------ 5 root root   4096 Nov  8 13:03 [0m[01;34mgdrive[0m/
-rw-r--r-- 1 root root 642378 Nov  8 13:20 med_devs_clean_data.csv
drwxr-xr-x 1 root root   4096 Nov  1 13:35 [01;34msample_data[0m/
drwxr-xr-x 2 root root   4096 Nov  8 13:05 [01;34msample_folder[0m/<jupyter_text>read files<jupyter_code>cat data.txt
# reading file in python
data = open("data.txt","r")
data_con = data.read()
data_con<jupyter_output><empty_output><jupyter_text>Accessing google drive form google colab<jupyter_code>! ls "/content/gdrive/My Drive/Colab Notebooks/"<jupyter_output>'affineTransformations (1).ipynb'   DecisionTrees.ipynb
 affineTransformations.ipynb	    linear_Algrebra_1.ipynb
'autoencoder (1).ipynb'		    LinearRegression_Basics.ipynb
 autoencoder.ipynb		    Untitled0.ipynb
'Copy of Welcome to Colaboratory'   Untitled1.ipynb<jupyter_text>Copy files from Google Drive into your Google Cola<jupyter_code>!pwd
cd "/content/gdrive/My Drive/Colab Notebooks/"

pwd<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup