edit SideBar

Main / Tar

To extract:
tar -xvf <archive>

To list and search:
tar -tzvf <archive.gz> | grep <pattern>

To create zipped:
tar -cap -f <archive.tar.gz> <input>

-a = auto-compress per suffix
-c = create archive
-C = change to dir
-f = filename
-p = preserve file permissions info
-t = list
-z = gzip

Definitive tar extract command

mkdir -p /target/directory && tar xf archive.tar -C /target/directory --strip-components=1

Page last modified on July 24, 2020, at 08:19 PM