In Unix- Linux , the name of the tar
command is short for tape archiving, the storing of entire file systems onto magnetic tape, which is one use for the command. However, a more common use for tar
is to simply combine a few files into a single file, for easy storage and distribution.
The tar command used to rip a collection of files and directories into highly compressed archive file commonly called tarball or tar, gzip and bzip in Unix – Linux. The tar is most widely used command to create compressed archive files and that can be moved easily from one disk to another disk or machine to machine.
16. Add Files or Directories to tar.gz and tar.bz2 files
The tar command don’t have a option to add files or directories to an existing compressed tar.gz and tar.bz2archive file. If we do try will get the following error.
# tar -rvf emrepics.tar.gz emrepics10.jpg # tar -rvf emrepics.tar.bz2 emrepics10.jpg