Fill these in once
- Pack a folder into a .tar.gz
tar -czf backup.tar.gz my-project - Leave out folders you don't want
tar -czf backup.tar.gz --exclude=node_modules --exclude=.git my-project - See what's inside, without unpacking
tar -tzf backup.tar.gz - Unpack here
tar -xzf backup.tar.gz - Unpack into another folder
mkdir -p restored tar -xzf backup.tar.gz -C restored
- Pack a folder into a .tar.gz
tar -czf backup.tar.gz my-project - Leave out folders you don't want
tar -czf backup.tar.gz --exclude=node_modules --exclude=.git my-project - See what's inside, without unpacking
tar -tzf backup.tar.gz - Unpack here
tar -xzf backup.tar.gz - Unpack into another folder
mkdir -p restored tar -xzf backup.tar.gz -C restored
- Pack a folder into a .tar.gz
tar -czf backup.tar.gz my-project - Leave out folders you don't want
tar -czf backup.tar.gz --exclude=node_modules --exclude=.git my-project - See what's inside, without unpacking
tar -tzf backup.tar.gz - Unpack here
tar -xzf backup.tar.gz - Unpack into another folder
New-Item -ItemType Directory -Force restored tar -xzf backup.tar.gz -C restored