Extract part of a tar archive

You can use tar -tvf to show the contents of a tar file.

tar -tvf  filename.tgz

You can extract a portion of the archive with

tar -zxvf filename.tgz path/inside/file -C destination/path

For instance, if I have a tar backup of my /home directory, and I need to extract a file out of the tarred Downloads to my current Downloads directory, I can do

tar -zxvf home.tgz home/incredigeek/Downloads/slack.deb ~/Downloads

https://www.cyberciti.biz/faq/list-the-contents-of-a-tar-or-targz-file/

https://stackoverflow.com/questions/24057301/bash-extract-only-part-of-tar-gz-archive

Installing Basic Linux tools on AlmaLinux 9 (tar, wget, htop)

The local team wizard Mark, ran into some issues while trying to setup a system with AlmaLinux 9. Tar wasn’t installed! What?! No worries. We can solve this by just installing tar with dnf. While we are at it, lets install some other helpful utilities.

sudo dnf install -y tar wget htop

Tada! We are back in business.

Extract Android backup

https://stackoverflow.com/questions/18533567/how-to-extract-or-unpack-an-ab-file-android-backup-file

Install Android Backup Toolkit

wget https://downloads.sourceforge.net/project/adbextractor/android-backup-tookit-20180521.zip
unzip android-backup-tookit-20180521.zip
cd android-backup-tookit/android-backup-extractor/android-backup-extractor-20180521-bin

Unpack backup. Changes it from an ab to a tar file

java -jar abe.jar unpack ~/path/to/backup.ab ~/path/to/backup.tar

After thats complete, you can untar it. Change Desktop to the path you want to extract to.

tar -xvf ~/path/to/backup.tar -C ~/Desktop/