This tutorial will guide you through the process of using ncdu (NCurses Disk Usage) in Google Colab to analyze and save detailed storage usage information from your Google Drive.
- Google Colab: A free cloud service that allows you to run Python code in a Jupyter notebook environment.
Open your web browser and go to Google Colab.
In a new code cell, run the following command to mount your google drive. Click continue on the prompt asking for permission.
from google.colab import drive
drive.mount('/content/drive')In a new code cell, run the following command to update the package list and install ncdu:
!apt update && apt install -y ncduAfter installing ncdu, run the following command to analyze your Google Drive storage and save the output to a text file:
!ncdu -o google_drive_ncdu.txtThis command will generate a detailed storage usage report and save it as google_drive_ncdu.txt.
Once the command completes, you can download the google_drive_ncdu.txt file:
On the left sidebar of Google Colab, click on the Files tab.
Locate google_drive_ncdu.txt in the file list.
Click the three dots next to the file and select Download.