Which of the following commands can be used to compress multiple files into a single gzip archive in Kali Linux?
Note
This command creates a single compressed archive (archive.tar.gz) containing file1, file2, and file3.
However, from the given options:
- gzip file1 file2 file3 will attempt to compress each file individually. gzip -c file1 > file2.gz > file3.gz is not a valid command.
- gzip file1 > file2.gz && gzip file2 > file3.gz will sequentially compress file1 and file2 but not into a single archive.
- gunzip file1 file2 file3 is used to decompress files, not compress them. None of the provided options directly create a single gzip archive from multiple files.
The best method is using tar as shown above.