Using 7z:
7z l file.7z 7z x file.7z directory/neededfile.txt
Using Tar:
tar ztvf file.tgz tar xzvf file.tgz directory/neededfile.txt
Note the “*t*” is the argument telling tar to list files, so you could do “*jtvf*” for a bz2 archive, etc…
Using 7z:
7z l file.7z 7z x file.7z directory/neededfile.txt
Using Tar:
tar ztvf file.tgz tar xzvf file.tgz directory/neededfile.txt
Note the “*t*” is the argument telling tar to list files, so you could do “*jtvf*” for a bz2 archive, etc…