Tuesday, July 22, 2014

tar

       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        # detailed info will be popped out. No need to use it.
       -z, --gzip




# Add three files into a tar file
$ tar -cf   a.tar   file1 file2 file3

# List files in the tar file
$ tar -tf   a.tar  

# ONLY extract two files out of the tar file
$ tar -xf   a.tar   file1 file2 

# Extract out all the files in the tar file
$ tar -xf   a.tar  

No comments:

Post a Comment