Reputation: 11
I downloaded a 30GB tar.xz file to my G-drive using Google Colab. I need help in extracting and reading this folder in Colab. Inside the tar folder, there are ten folders. Is it possible to read these folders individually? I have tried the following but it failed.
Any suggestion about how to proceed with this problem. Thank you
Upvotes: 1
Views: 1179
Reputation: 40838
You can extract only a directory inside the tar file, using --wildcards
option.
!tar xf file.tar.xz --wildcards 'path_to/dir/*'
Here's an example notebook.
Upvotes: 1