Select Page

ABIOLA RASP – Raspberries for African School Projects

Wie können wir helfen?

< Alle Themen
Print

Create a tar archieved file

no-822 au-03

Create a tar

tar is a computer software utility for collecting many files into one archieved file, often referred to as a tarball, for distribution or backup purposes.

1) A folder that will be compressed

2) A txt file that will be compressed

3) A jpg file that will be compressed

4) Run below command to create a tarball.

tar cf compressed.tar abiola/ note.txt demo.jpg

FORMAT:
tar cf compressedFile.tar file

5) This the tarball

Extract a tarball

xf parameter can be used to extract a tarball. To do this, please check below screenshot.

1) Run below command to extract a tarball

tar xf compressed.tar

FORMAT:
tar xf compressedFile.tar

It extracts the files to the current directory.

Create a tar with gzip compression

You must use czf parameter to create with gzip compression.

1) A folder that will be compressed

2) A txt file that will be compressed

3) A jpg file that will be compressed

4) Run below command to create a tar.

tar czf compressed.tar.gz abiola/ note.txt demo.jpg

FORMAT:
tar czf compressedFile.tar.gz file

5) This the tar file with gzip compression.

Exract tar which is created gzip compression

To extract it, please follow below steps.

1) Run below command.

tar xzf compressed.tar.gz

FORMAT:
tar xzf compressedFile.tar.gz

It extracts to the current directory.

This article is a component of the “Linux Introduction” course from the ABIOLA online Academy.

Please refer: https://academy.abiola.ngo/courses/linux-introduction/?lang=en

Inhaltsverzeichnis