Ubuntu Command Line - Creating & Extracting Tarballs In from the Command Line

Опубликовано: 15 Июль 2026
на канале: Cyber Skill Pro
66
0

Creating & Extracting Tarballs In Ubuntu From the Command Line

Tutorial on how to create & extract archives or tarballs from the command line in Ubuntu
To create a tarball or archive you type:
tar -cvf photos.tar photos

===========================================================================

MEANING OF OPTIONS
c=create, v=verbose, f=file information r= append, x=extract
===========================================================================

tar -rvf photos.tar – this is for appending the tarball
tar -xvf photos.tar – will extract the tarball
===========================================================================

If you see a file with the .tar.gz extension then you can just add the -z flag
Ex. tar -xzvf photos.tar.gz – will extract the tarball
===========================================================================

To zip and compress a single file use the gzip command
gzip (filename)

To unzip a single file use the gunzip command
gunzip (filename)
===========================================================================

**REMEMBER THE UBUNTU COMMAND LINE IS CASE SENSITIVE**
Additional commands used in video:
mv = move file
cp = copy file