I am updating my Ubuntu distribution from 18.04 to 22.04. I exported the Ubuntu 18.04 instance with wsl --export Ubuntu-18.04 <file.tar>
to a tarball and am trying to figure out how to effectively extract the files I need from it into my new 22.04 instance.
I know I can...
- view the contents of the tarball with
tar -tvf <file.tar>
(t: view contents, v: verbose, f: next arg is filename) - extract the whole thing with
tar -xvf <file.tar>
(x: extract) - extract a file or folder with
tar -xvf <file.tar> <filename_or_folder>
But I probably have over 1k files when I list them and I figure there has to be a more efficient way to go through them than listing and manually reading over ALL the files. I'm honestly not sure what all is in there, but I'm at least wanting to move over the relevant files for python and java projects and any config files.
I have already run the following, so using a different approach might be hard at this point:
- wsl --terminate Ubuntu-18.04
- wsl --unregister Ubuntu-18.04