NAME
tar - The GNU version of the tar archiving utility
SYNOPSIS
tar <operation> [options]
Operations:
[-]A --catenate --concatenate
[-]c --create
[-]d --diff --compare
[-]r --append
[-]t --list
[-]u --update
[-]x --extract --get
--delete
Common Options:
-C, --directory DIR
-f, --file F
-j, --bzip2
-p, --preserve-permissions
-v, --verbose
-z, --gzip
For example,
(i) compress a list /etc to etc.tar
tar -cvf /etc.tar /etc // only package, not compress
tar -zcvf /etc.tar.gz /etc // packaged, then compress the target by gzip
tar -jcvf /etc.tar.gz /etc // packaged, then compress the target by bzip2
(ii) inquire the contents of the target file
tar -ztvf /etc.tar.gz
(iii) only decompress a list(password) of the target file
tar -zxvf /etc.tar.gz /etc/password
(iv) back up the contents of the target file and keep its authority
tar -zxvpf /etc.tar.gz /etc
(v) at the target /home, back up the file later than 2005/08/08.
tar -N '2005/08/08' -zcvf /etc.tar.gz /home
No comments:
Post a Comment