Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Tuesday, August 24, 2021

How to attach and detach your drive files to google colab?

To attach execute the following

from google.colab import drive
drive.mount('/content/drive') 
   

To Detach execute the following,

from google.colab import drive
drive.flush_and_unmount()

Tuesday, January 18, 2011

how to find the pattern within files?

Using grep we achieve this..
Say we have to find out the word "gdk" from all the '.c' files in a directory.. the command would be

$grep -i "pattern" files

ex: $grep -i "gtk" *.c          <===== Will search all .c files in the current directory.
ex: $grep -i "gtk" file1, file.23, file <== Will search only in the specified files.