Tuesday | 05 NOV 2024
[ previous ]
[ next ]

Tar Cheatsheet

Title:
Date: 2022-09-18
Tags:  cheatsheet

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.