MODULE 9- Archiving and compression Flashcards

1
Q

What term describes combining multiple files into one to reduce overhead and make them easier to transmit?

A

Archiving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which type of compression is required for things that must remain intact, like documents, logs, and software?

A

Lossless compression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the term for decompressing an archive and extracting files from it?

A

Un-archiving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which type of compression ensures the decompressed file is identical to the original?

A

Lossless compression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What process removes redundant information from files to reduce storage or transmission size?

A

Compression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which type of compression removes information to reduce size, resulting in a file that may be slightly different from the original?

A

Lossy compression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which command decompresses files that were compressed with gzip?

A

gunzip

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What kind of files typically use lossy compression to reduce size while maintaining acceptable quality?

A

Media files like images, audio, and video

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens when you repeatedly compress and decompress a file using a lossy algorithm?

A

The file becomes increasingly distorted and may become unrecognizable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is compressing files before sending them to tape or over slow networks often preferred?

A

It reduces transmission time and improves performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which Linux tool is commonly used to compress files using the Lempel-Ziv algorithm?

A

gzip

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What file extension is added to a file compressed with gzip?

A

.gz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command can also be used instead of gunzip to decompress a .gz file?

A

gzip -d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the result of running gzip longfile.txt on a file in Linux?

A

The file is replaced with longfile.txt.gz, and the original is removed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command shows the compression ratio and file sizes of a .gz file?

A

gzip -l filename.gz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which compression tool uses the Burrows-Wheeler block sorting algorithm and produces .bz2 files?

A

bzip2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the advantage of bzip2 over gzip?

A

Better compression ratio, but uses more CPU time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which tool is used to decompress .bz2 files in Linux?

A

bunzip2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a key reason to use archiving when backing up directories?

A

It is easier to manage one archive file than updating many individual files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which image format uses lossy compression and allows adjustable quality settings?

A

JPEG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What compression tool uses the Lempel-Ziv-Markov chain algorithm and produces .xz files?

A

xz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which compression tool offers the best of both worlds: gzip-like speed and bzip2-like compression?

A

xz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which decompression tool corresponds to the .xz format?

A

unxz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a common misconception when trying to compress an already compressed file?

A

That it will become smaller, when in fact it usually won’t.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Which image formats use lossless compression?
PNG and GIF
4
What artifacts might appear in lossy-compressed images if the quality is too low?
Rough edges or discolorations
4
Which Linux command is traditionally used to create a single archive file from multiple files, especially for backup or transmission?
tar
4
Which option creates a tar archive from one or more input files?
-c
4
Which option specifies the name of the archive file in a tar command?
-f ARCHIVE
4
Which command creates an archive named alpha_files from all files starting with "alpha"?
tar -cf alpha_files.tar alpha*
4
What are the three main modes of the tar command?
→ Create, Extract, List.
4
Which option in tar tells it to compress the archive using gzip?
-z
4
Which command creates a tar.bz2 archive of a folder named School using bzip2?
tar -cjf School.tar.bz2
4
Which command compresses all alpha files and creates tar archive directly using gzip and creates alpha_files?
tar -czf alpha_files.tar.gz
5
Which command-line utility is traditionally used on UNIX to archive files into a single file for backup or transfer?
tar, which stands for TApe aRchive.
5
Which option tells tar to compress the archive using bzip2 instead of gzip?
-j
6
Which command would you use to create a new archive from multiple files using tar?
tar -cf archive_name.tar file1 file2 ...
7
Which option in the tar command specifies that a new archive should be created?
The -c option.
8
Which tar option is used to specify the name of the archive file being created or extracted?
The -f option followed by the archive name.
8
What is the default file extension for an uncompressed tar archive?
.tar
9
Why are tarball files usually slightly larger than the sum of the original files?
Due to overhead information required for recreating the original files.
10
Which tar option allows gzip compression during archive creation or extraction?
The -z option.
10
Which tar option allows compression or decompression using bzip2 instead of gzip?
The -j option.
10
What is the result of running tar -czf alpha_files.tar.gz alpha*?
A gzip-compressed archive named alpha_files.tar.gz containing all files starting with “alpha”.
10
Which command can display compression details such as compressed size and ratio for a .tar.gz file?
gzip -l filename.tar.gz
11
Which tar option is used to decompress a bzip2-compressed archive?
The -j option.
11
What does the .tar.gz file extension indicate?
A tar archive compressed using gzip.
11
In the command tar -tjf folders.tbz, what does the -f option specify?
The name of the archive file to operate on, in this case folders.tbz.
11
What does the -j option specify in extract mode with tar?
That the archive is compressed with bzip2 and should be decompressed during extraction.
12
What are the common file extensions used for tar archives compressed with bzip2?
.tar.bz2, .tbz, or .tbz2
12
Which command creates a bzip2-compressed archive named folders.tbz from the School directory?
tar -cjf folders.tbz School
12
Which tar option is used to display the contents of an archive without extracting them?
The -t option.
13
What does the command tar -tjf folders.tbz do?
Lists the contents of the folders.tbz archive, decompressing it with bzip2.
14
Which pipeline command can list the contents of a Folders.tbz file without using -j in the tar command?
bunzip2 -c folders.tbz | tar -t
15
What does the -c option do in the bunzip2 -c folders.tbz command?
Sends the decompressed output to standard output (the screen or a pipe).
15
Which tar option is used to extract files from an archive?
The -x option.
16
What does the command tar -xjf folders.tbz do?
Extracts the contents of the bzip2-compressed archive folders.tbz.
17
In extract mode, what is the purpose of the -f option in tar?
Specifies the archive file to operate on.
18
After extracting an archive, what happens to the original archive file?
It remains untouched.
19
What option should be added to a tar extract command to see which files are being processed?
The -v option for verbose output.
19
What does the output of tar -xjvf folders.tbz show?
A detailed list of each file and directory being extracted.
20
Which command copies the folders.tbz archive to the Downloads directory before extraction?
cp Documents/folders.tbz Downloads/folders.tbz
20
What must you do before extracting files to avoid overwriting current data or to isolate files?
Change to or create a clean directory, such as moving the archive to ~/Downloads.
21
What does tar do if an extracted file already exists in the target directory?
It overwrites the file without prompting.
22
Which compression utility is considered the de facto archiving standard on Microsoft systems, and also supported on Linux with specific commands?
The ZIP file format, which is handled using the zip and unzip commands on Linux systems.
22
Which option in the zip command allows you to recursively archive a directory and all of its contents, including subfolders?
The -r option, which tells zip to include all files and subdirectories recursively.
22
What resource is recommended to explore more advanced features of tar?
The tar documentation.
23
Which solution is suggested to avoid overwrite prompts when extracting a ZIP archive?
Copy the archive into a new empty directory and then extract it there to prevent conflicts with existing files.
23
Which command's default behavior does not recurse into subdirectories unless explicitly told to with the -r option?
The zip command, which will only include an empty directory unless the -r option is used to enable recursion.
23
Which Linux command is used to create a compressed archive by default when a filename and list of files are passed?
The zip command, which adds files to an archive and compresses them by default.
24
What does the output line (deflated 48%) indicate when using the zip command?
It shows the compression ratio for that specific file, indicating how much its size was reduced in the archive.
24
What default behavior occurs when running unzip followed by an archive name, without any options?
The archive is extracted to the current directory, and if files already exist, prompts appear to confirm overwriting.
24
Which option is required by tar to inform the command that a filename is being passed, but is not needed in zip and unzip because the filename is expected?
The -f option, which is essential in tar but unnecessary in zip and unzip.
25
What must be done when extracting a specific file from a .zip archive if that file resides within a subdirectory?
Provide the full path including the directory component, such as School/Math/numbers.txt, to match the file inside the archive.
25
Which command and option combination is used to display the contents of a .zip file, including filenames, sizes, and timestamps?
unzip -l, which lists the archive’s content in a structured table format.
26
Which options and syntax would you use to add a new file to an existing archive and see the results?
tar -rvf existing.tar newfile.txt
26
Which option is used with unzip to simply view what's in the archive without extracting it?
The -l (list) option, which displays the archive's content in a tabular format.
27
Which command and syntax would you use to compress a /etc/udev directory and its contents?
zip -r udev.zip /etc/udev
27
Which command and syntax would you use to make a zip compressed version of the words file?
zip words.zip words
28
Which command and syntax would you use to view the contents of the udev.zip archive?
unzip -l udev.zip
29
Which command as syntax would you use to extract the contents of the udev.zip archive?
unzip udev.zip