A Linux administrator recently downloaded a software package that is currently in a compressed file. Which of the following commands will extract the files?
unzip -v only displays the contents with verbosity of a compressed file but not extract
bzip2 -z will compress a file not extract
gzip will only compress a file not extract
funzip is the ONLY option here that if used just like it is will extract a file. The funzip command is used to decompress files that have been compressed with the ZIP compression algorithm. It is part of the Info-ZIP suite of tools and is typically available on Linux and Unix systems.
Correct answer: D
unzip -v is not sufficient to accomplish the task.
bzip2 -z is going to compress the file.
gzip is going to compress the file. (The option is gzip, not gunzip people. Don’t assume.)
funzip alone will extract compressed ZIP files.
unzip -v: The -v option with unzip is used to list the contents of a zip file but does not extract them. So, while unzip is a valid command for extraction, -v alone won’t do it, therefor i'm going with D.
funzip is a command in Linux for decompression. It is part of the Info-ZIP suite and is used to extract the contents of a single file from a compressed .zip archive, sending the decompressed data to standard output (stdout). Unlike the unzip command, funzip works only with a single member from a zip archive or from a stream of compressed data, making it useful in pipelines or when you want to process the decompressed content on-the-fly without fully extracting the file to disk.
As written, "funzip" is the only command here that will actually extract a .zip. None of these will extract anything else compressed without additional options. Hopefully this question is just wrong.
opposite of gzip is gunzip...gzip compresses, gunzip uncompresses ... just because .gz suffix on a file, it will not uncompress with gzip...needs gunzip
# gzip file.gz
gzip: file.gz already has .gz suffix -- unchanged
gzip -d decompresses,, but then they aren't giving us the -d in the answer.. These questions are ridiculous. we shouldn't have to be guessing if an option can or can't be used.
I agree with A. Be careful in assuming that the package being downloaded is in gzip format. It can be in any acceptable format in Linux, such as xz or bz2 or zip. Also, the wording of the question is tricky. When I took an earlier version of Linux+ (when it was two exams), they were pretty clear when they wanted just a command as an answer versus the entire command syntax, which can include options and arguments.
I disagree and think the answer is C. the question says it download a software package. a linux software package is going to be stored in gz formate not windows zip format. The question also doesn't ask for an argument/operation, just which command.
upvoted 1 times
...
...
Log in to ExamTopics
Sign in:
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.
Rob74613
Highly Voted 1 year, 8 months agoJRS99
Most Recent 3 weeks, 4 days agoinsanegrizly
2 months, 1 week agoQubert2
3 months agoriddie78
1 year agokennethcan
1 year, 2 months agolinux_admin
1 year, 11 months agolinux_admin
1 year, 11 months agolinux_admin
1 year, 10 months agobjornborg
2 years, 2 months agoTheRealManish
2 years, 1 month agoVeteran903
2 years, 1 month agoMissAllen
2 years, 2 months agoAamm033
2 years, 2 months agoTheRealManish
2 years, 2 months ago