As I always forget which switches to use on tar I made this little note.

Create archive


$ tar -zcvpf <destination> <source>

z = gzip
c = create
v = verbose
p = preserve permissions
f = file

Unpack archive


$ tar -xvpf <archive>

x = extract
v = verbose
p = preserve permissions
f = file


Categories

Linux Snippets