RHEL 7 – TAR Command



What is TAR?

GNU  `tar'  saves  many files together into a single tape or disk archive, and can restore individual

files from the archive.


EXAMPLES
       tar -cf archive.tar  /etc
              # Create archive.tar from files foo and bar.

       tar -tvf archive.tar
              # List all files in archive.tar verbosely.

       tar -xf archive.tar
              # Extract all files from archive.tar.

We can also use below parameter as per my requirement

Main operation mode:
       -c, --create “ create a new archive “
       -x, --extract, --get “  extract files from an archive / use archive file or device ARCHIVE “
       -j, --bzip2 “  filter the archive through bzip2 “
        -J, --xz “  filter the archive through xz “
       -p, --preserve-permissions “  extract  information  about  file permissions (default for superuser) “
       -v, --verbose “ verbosely list files processed “
       -z, --gzip “  filter the archive through gzip “
       -f, --file=ARCHIVE “    use archive file or device ARCHIVE

No comments: