Tar Command

Tarballs are life savers. I have use the tar command exclusively for backups. The tar command is used for creating a tarball. It is also used for viewing, adding, and extracting files to and from a tarball. There are 4 important tar commands that every Linux administrator should know.

Creating a tarball ==> “tar -cvf tarball.tar files”
Adding files to a tarball ==> “tar -rvf tarball.tar files”
Extracting files from a tarball ==> “tar -xvf tarball.tar dir”
Viewing the contents of a tarball ==> “tar -tvf tarball.tar”

“files” = can be substituted as a single file, wildcard entries or a directory.

Posted in Uncategorized

1 thought on “Tar Command

  1. Very usefull command. I allways have problems with remember all of them 😛 Maybe this will be helpful :]

Comments are closed.