Introduction
In this challenge, you need to compression files and directories. You will use the tar
and zip
commands.
Achievements
tar
- Create, extract, and list files from a tar archivezip
- Compress files
In this challenge, you need to compression files and directories. You will use the tar
and zip
commands.
tar
- Create, extract, and list files from a tar archivezip
- Compress filesIn this challenge, you need to pack files with the tar
command.
We have already created three files for you, file1
, file2
, and file3
. You can find them in the /home/labex/project
directory.
file1
, file2
, and file3
files into different archive files.tar
command to pack files and directories.gzip
, bzip2
, and xz
compression methods.After you have packed the files, you can use the ls
command to list the files in the /home/labex/project
directory. You should see the following output:
cd ~/project
ls
archive.tar.bz2 archive.tar.gz archive.tar.xz
In this step, you need to pack files with the zip
command.
file1
, file2
, and file3
files into archive.zip
.zip
command to pack files and directories.file1
, file2
, and file3
files in the archive.zip
file.After you have packed the files, you can use the ls
command to list the files in the /home/labex/project
directory. You should see the following output:
cd ~/project
ls
archive.zip
In this challenge, you learned how to packing and unpacking files using the tar
command and you also learned how to compress files using the zip
commands.