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.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply