Quick Answer: How Do I Compress a Directory in Linux Using Tar?
Contents How Do I Compress a Folder with Tar? How to Compress and Extract Files Using Tar Command in Linux Tar -Czvf Name-of-Archive. Tar. Gz...
Contents
How do I compress a folder with tar?
How to compress and extract files using tar command in Linux
- tar -czvf name-of-archive.tar.gz /path/to/directory-or-file.
- tar -czvf archive.tar.gz data.
- tar -czvf archive.tar.gz /usr/local/something.
- tar -xzvf archive.tar.gz.
- tar -xzvf archive.tar.gz -C /tmp.
How do I zip a directory in Linux tar?
Put a Directory into a TAR file and Compress it with GZIP
Replace FILENAME with whatever filename you want and DIRECTORY with the path to the directory you want to make into a compressed tarball. Tarred files compressed with GZIP sometimes use the . tgz file extension.