CLI download and unzip file via Jupyter Notebook
Mohamad's interest is in Programming (Mobile, Web, Database and Machine Learning). He is studying at the Center For Artificial Intelligence Technology (CAIT), Universiti Kebangsaan Malaysia (UKM).
[1] Ubuntu Linux
# Create the asset folder if it doesn't exist
!mkdir -p asset
# Download the file
!wget -O razzi_util_20250206.zip "https://nlp.razzi.my/module/razzi_util_20250206.zip"
# Unzip into the asset folder
!unzip -o razzi_util_20250206.zip -d asset
# (Optional) List the contents of the asset folder
!ls -l asset
[2] Windows Powershell
# Create the asset folder if it doesn't exist
!powershell New-Item -ItemType Directory -Force -Path asset
# Download the file (PowerShell equivalent of wget)
!powershell Invoke-WebRequest -Uri "https://nlp.razzi.my/module/razzi_util_20250206.zip" -OutFile "razzi_util_20250206.zip"
# Unzip into the asset folder
!powershell Expand-Archive -Path "razzi_util_20250206.zip" -DestinationPath "asset" -Force
# (Optional) List the contents of the asset folder
!powershell Get-ChildItem -Path asset
suppose the asset folder is located at ../../asset
# Create the asset folder if it doesn't exist
!powershell New-Item -ItemType Directory -Force -Path ../../asset
# Download the file (PowerShell equivalent of wget)
!powershell Invoke-WebRequest -Uri "https://nlp.razzi.my/module/razzi_util_20250206.zip" -OutFile "razzi_util_20250206.zip"
# Unzip into the asset folder
!powershell Expand-Archive -Path "razzi_util_20250206.zip" -DestinationPath "../../asset" -Force
# (Optional) List the contents of the asset folder
!powershell Get-ChildItem -Path ../../asset