Skip to content

Instantly share code, notes, and snippets.

@prmoore77
Last active August 1, 2024 16:57
Show Gist options
  • Save prmoore77/17f3e91deef58a57f84d5fa7014007b2 to your computer and use it in GitHub Desktop.
Save prmoore77/17f3e91deef58a57f84d5fa7014007b2 to your computer and use it in GitHub Desktop.
Tar and zip directory
#!/bin/bash
# Create the gzipped tar file with:
pushd /path/to/dir
tar -czf filename.tar.gz .
popd
# Extract the gzipped tar file with:
tar -xvf filename.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment