home
tar-cheatsheet.md

Tar Cheatsheet

2022-09-18 2

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

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

curl -s https://nivethan.dev/uploads/qmsys-alpine.tar | tar xvf - -C /usr/

wget -qO- https://nivethan.dev/uploads/qmsys-alpine.tar | 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.