extract tar gz folder code example
Example 1: gzip folder with tar
# gzip my-folder-name
#
# flags:
# z = filter the archive through gzip
# c = create a new archive
# v = verbosely list files processed
# f = use archive file or device ARCHIVE
#
# Example:
tar -zcvf my-filename.tar.gz my-folder-name
Example 2: extract from tar gz into folder
mkdir foo
tar -xzf bar.tar.gz -C foo
Example 3: extract tar gz
tar xvzf file.tar.gz