Most Linux distros and macOS have tar program pre-installed by default, it can be used to create tar.gz archives. Command structure is next:
tar -czvf archive.tar.gz /path/to/file/or/dir
What these flags mean:
-
-c- instructstarthat we are going to create new archive; -
-z- use gzip as compression method; -
-f archive.tar.gz- specifies archive file name; -
-v- enables verbose mode; -
/path/to/file/or/dir- a list of files or directories to be included into archive, space-separated.
Popular knowhows
pubsub
gcloud
docker
3 years ago
go
golang
testing
3 years ago
ubuntu
macos
terminal
tar
3 years ago