DEV Community

Le Vuong
Le Vuong

Posted on • Edited on

Tar common use cases

# Create compessed file compessed.tar from file1, file2, file3
# options: -c: create, z: compressed, f: file
tar czf compessed.tar file1 file2 file3

# List content of file compessed.tar
# options: t: list content, z: compressed file, f: file
tar tzf compessed.tar

# Extract (decompress) content of compressed file.
# options: x: extract, z: compressed file, f: file
tar xzf compessed.tar
Enter fullscreen mode Exit fullscreen mode

Top comments (0)