Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for tar

November 8, 2020

Tar List of Files

Here’s another way of creating a tar ball from a list of files.

tar -cvf backup.tar.gz a.txt b.txt c.txt d.txt e.txt

tar -cvf backup.tar.gz a.txt b.txt c.txt d.txt e.txt

Here’s how to view files in a tarball.

tar -tvf backup.tar.gz

tar -tvf backup.tar.gz

October 30, 2019

Tar Commands

Here are two important tar commands on how to create and extract a tar.gz file.

Create a tar gzip file called “project.tar.gz” of a directory called “foo.”

tar -cvzf project.tar.gz foo

tar -cvzf project.tar.gz foo

Untar the “project.tar.gz” file to a directory called bar.

tar -zxvf project.tar.gz bar

tar -zxvf project.tar.gz bar

September 8, 2019

View contents of tar file

Here’s how to view the contents of a tar file without extracting the files.

tar -tvf file.tar

tar -tvf file.tar

  • 1
  • 2
  • Next Page »
  • Cloud
  • Linux
  • Git

Copyright © 2012–2021