0
0
Linux CLIscripting~10 mins

tar (create and extract archives) 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 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'
A-rvf
B-xvf
C-tvf
D-cvf
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-xvf' which is for extracting archives.
Using '-tvf' which lists archive contents instead of creating.
2fill in blank
medium

Complete 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'
A-cvf
B-tvf
C-xvf
D-rvf
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-cvf' which creates archives instead of extracting.
Using '-tvf' which only lists contents.
3fill in blank
hard

Fix 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'
A-tvf
B-xvf
C-cvf
D-rvf
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-xvf' which extracts instead of listing.
Using '-cvf' which creates archives.
4fill in blank
hard

Fill 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'
A-z
B-x
C-c
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-x' which extracts instead of creating.
Forgetting the '-z' option for gzip compression.
5fill in blank
hard

Fill 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'
A-x
B-v
C-j
D-c
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-c' which creates archives instead of extracting.
Forgetting '-j' for bzip2 compressed files.