Friday | 08 DEC 2023

Tar Cheatsheet

tar cvf folder.tar folder --exclude .git 
tar czvf folder.tar.gz folder --exclude .git 
tar cjvf folder --exclude .git 

tar tvf folder.tar | less
tar xvf folder.tar

curl -s | tar xvf - -C /usr/

wget -qO- | tar xvf -

The -C switch will let you specify an existing folder to extract to.

Using curl and wget, you can stream a tar file without saving it to disk.