Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to create a tar archive named archive.tar from the folder myfolder.
Linux CLI
tar [1] archive.tar myfolder Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-xvf' which is for extracting archives.
Using '-tvf' which lists archive contents instead of creating.
✗ Incorrect
The option '-cvf' tells tar to create an archive (c), be verbose (v), and specify the filename (f).
2fill in blank
mediumComplete the command to extract the contents of archive.tar into the current directory.
Linux CLI
tar [1] archive.tar Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-cvf' which creates archives instead of extracting.
Using '-tvf' which only lists contents.
✗ Incorrect
The option '-xvf' tells tar to extract (x), be verbose (v), and specify the filename (f).
3fill in blank
hardFix the error in the command to list the contents of archive.tar.
Linux CLI
tar [1] archive.tar Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-xvf' which extracts instead of listing.
Using '-cvf' which creates archives.
✗ Incorrect
The option '-tvf' lists the contents (t) of the archive verbosely (v) and specifies the filename (f).
4fill in blank
hardFill both blanks to create a compressed gzip tar archive named archive.tar.gz from folder myfolder.
Linux CLI
tar [1] [2] -f archive.tar.gz myfolder
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-x' which extracts instead of creating.
Forgetting the '-z' option for gzip compression.
✗ Incorrect
Use '-c' to create the archive and '-z' to compress it with gzip.
5fill in blank
hardFill all three blanks to extract a bzip2 compressed tar archive named archive.tar.bz2 verbosely.
Linux CLI
tar [1] [2] [3] -f archive.tar.bz2
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-c' which creates archives instead of extracting.
Forgetting '-j' for bzip2 compressed files.
✗ Incorrect
Use '-x' to extract, '-v' for verbose output, and '-j' to handle bzip2 compression.