Hi Sir,
How to untar the below files ? we used this command to tar the file .
tar -czf workspace.tar.gz /tf
tar -czf - /tf | split --bytes=100MB - /tf/workspace.tar.gz
Hi Sir,
How to untar the below files ? we used this command to tar the file .
tar -czf workspace.tar.gz /tf
tar -czf - /tf | split --bytes=100MB - /tf/workspace.tar.gz
First you need to download all the “split” files and reassemble them back into one monolithic file. On linux or Mac, you do that like this:
cat workspace.tar.gz* > workspace.tar.gz
On Windows, the equivalent command is:
type workspace.tar.gz* > workspace.tar.gz
Now you have recreated the complete “tar” file and can “untar” it. On linux or Mac, that is:
tar xzf workspace.tar.gz
If you’re on Windows, then “tar” is not a native Windows command. If you have W10 or above, then you have the Ubuntu option, but most people don’t really use that I guess. The other alternative is to get a third party app that knows how to do this. In the past I’ve always used “7zip” for this purpose. It’s free and works well. Just google and you’ll find it. You’ll have to read the documentation on their website to figure out the commands you need. Sorry, but I don’t remember. You can also just google “how to unpack tar file on Windows” and you’ll probably find other answers.
Of course with a normal “tar” file with relative pathnames, you need to make sure you are in the right directory when you do that, because everything will be created locally. But I’m guessing that your tar file is going to have absolute pathnames starting with /tf
, so I’m not sure what Windows will do with that. Even on a linux or Mac system, that’s probably not what you want. You might want to rethink the way you created tar file in the first place.
Please don’t forget the -h flag. This ensures that symbolic link targets are archived as well. This is useful when your model / data directory is present as a symbolic link in your workspace.
@paulinpaloalto Could you please make the correction to tar czh
in the page below?
Here’s the support page.
https://www.coursera.support/s/article/360004990332-Download-Jupyter-Workspace-files?language=en_US
Thanks.
That’s a great point about the “h” option being required on the “tar” commands. A number of the assignments here contain symlinks.
Sorry @balaji.ambresh but that is a generic Coursera Support page. I do not have the ability to modify that. You can report the bug as well as I can to Coursera Help, but note that there are other things about that page that are too generic to work with the Deeplearning.AI courses, e.g. in some cases when you open a “Terminal” in the Deeplearning courses, the current working directory has nothing to do with where the actual workspace subtree is. I think it’s a hopeless task to try to make their generic help work for all the specifics of the Deeplearning assignments. Rather than deal with the generic Coursera pages, I think it makes more sense to have our own Discourse threads that we refer people to. E.g. this one, this one and this one.