Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 101-500 topic 1 question 56 discussion

Actual exam question from LPI's 101-500
Question #: 56
Topic #: 1
[All 101-500 Questions]

Which of the following commands displays the contents of a gzip compressed tar archive?

  • A. gzip archive.tgz | tar xvf -
  • B. tar ג€"fzt archive.tgz
  • C. gzip ג€"d archive.tgz | tar tvf -
  • D. tar cf archive.tgz
  • E. tar ztf archive.tgz
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
klom
Highly Voted 3 years, 7 months ago
the correct one is: tar -ztf archive.tar.gz
upvoted 14 times
germanb
3 years, 7 months ago
this is correct
upvoted 3 times
...
CuriousLinuxCat
2 years, 9 months ago
Agreed, this is the correct format. -z Use Gzip -t List contents -f Specify file or else will use $TAPE.
upvoted 7 times
...
...
PERjham
Highly Voted 3 years, 3 months ago
"tar zvf" is the correct, command tar work without the "-" character too (testing in rhel and same, and debian).
upvoted 8 times
SScott
2 years, 4 months ago
That is correct, this option will work without switches and can be .tar.gz or tgz (Tested using CentOS7): tar cvfz backup-1.tgz (to create) tar ztf backup-1.tgz (to list the contents without extracting/unpacking) the tar.gz can be substituted just fine with .tgz z switch is for handling .tar.gz g zip files, the t switch list the contents without extracting the file, and f specifies the command is to use the archive file name, the -v switch would help to show permissions, size, and timestamp but the answer E could exclude this as the question asks about displaying the contents of the tar file. https://www.hostdime.com/kb/hd/command-line/how-to-tar-untar-and-zip-files
upvoted 2 times
...
...
Ninymo
Most Recent 1 month ago
Answer: E
upvoted 1 times
...
Tewodros89
7 months, 1 week ago
the correct one is: tar -ztf archive.tar.gz
upvoted 1 times
...
dawith
7 months, 2 weeks ago
correct
upvoted 1 times
...
blk_542
1 year, 5 months ago
Tested them all, none worked in CentOS 7
upvoted 1 times
...
MartiFC
2 years, 5 months ago
correct
upvoted 2 times
...
demarko
3 years, 4 months ago
non of these option worked on centos7 tar -tvf is the answer https://www.tecmint.com/18-tar-command-examples-in-linux/
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...