Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete 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'
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.
✗ Incorrect
The -z option tells tar to use gzip compression when creating the archive.
2fill in blank
mediumComplete 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'
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.
✗ Incorrect
The -j option tells tar to use bzip2 compression when extracting the archive.
3fill in blank
hardFix 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'
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.
✗ Incorrect
The -J option tells tar to use xz compression when creating the archive.
4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -j for gzip compression.
Using x instead of c to create the archive.
✗ Incorrect
Use -z for gzip compression and c to create the archive.
5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -z for bzip2 compression.
Using c instead of x to extract.
Omitting verbose option if needed.
✗ Incorrect
Use -j for bzip2 compression, x to extract, and -v for verbose output.