0
0
Linux CLIscripting~10 mins

tar with compression (-z, -j, -J) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a gzip compressed archive named archive.tar.gz of the folder myfolder.

Linux CLI
tar [1] -cf archive.tar.gz myfolder
Drag options to blanks, or click blank then click option'
A-x
B-j
C-J
D-z
Attempts:
3 left
💡 Hint
Common Mistakes
Using -j which is for bzip2 compression.
Using -J which is for xz compression.
Using -x which extracts files instead of creating.
2fill in blank
medium

Complete the code to extract a bzip2 compressed archive named data.tar.bz2.

Linux CLI
tar [1] -xf data.tar.bz2
Drag options to blanks, or click blank then click option'
A-c
B-j
C-J
D-z
Attempts:
3 left
💡 Hint
Common Mistakes
Using -z which is for gzip compression.
Using -J which is for xz compression.
Using -c which creates archives instead of extracting.
3fill in blank
hard

Fix the error in the command to create an xz compressed archive named backup.tar.xz of the folder docs.

Linux CLI
tar -cf backup.tar.xz [1] docs
Drag options to blanks, or click blank then click option'
A-z
B-j
C-J
D-x
Attempts:
3 left
💡 Hint
Common Mistakes
Using -z which is for gzip compression.
Using -j which is for bzip2 compression.
Using -x which extracts files instead of creating.
4fill in blank
hard

Fill both blanks to create a gzip compressed archive named project.tar.gz from the folder project.

Linux CLI
tar [1] -[2]f project.tar.gz project
Drag options to blanks, or click blank then click option'
A-z
Bc
Cx
D-j
Attempts:
3 left
💡 Hint
Common Mistakes
Using -j for gzip compression.
Using x instead of c to create the archive.
5fill in blank
hard

Fill all three blanks to extract a bzip2 compressed archive named logs.tar.bz2.

Linux CLI
tar [1] -[2]f logs.tar.bz2 [3]
Drag options to blanks, or click blank then click option'
A-j
Bx
C-v
D-z
Attempts:
3 left
💡 Hint
Common Mistakes
Using -z for bzip2 compression.
Using c instead of x to extract.
Omitting verbose option if needed.