Question 4Which of the following Powershell commands will take all files from the desktop “TestArchive” directory, and archive it in a “TestArchive.zip” file?1 pointCreate-Archive -path C:\Users\testuser\Desktop\TestArchive\ ~\Desktop\TestArchive.zip B: Expand-Archive -path C:\Users\testuser\Desktop\TestArchive\ ~\Desktop\TestArchive.zipArchive -path C:\Users\testuser\Desktop\TestArchive.zip ~\Desktop\TestArchive\ *A: Compress-Archive -path C:\Users\testuser\Desktop\TestArchive\ ~\Desktop\TestArchive.zip
Question
Question 4Which of the following Powershell commands will take all files from the desktop “TestArchive” directory, and archive it in a “TestArchive.zip” file?1 pointCreate-Archive -path C:\Users\testuser\Desktop\TestArchive\ ~\Desktop\TestArchive.zip B: Expand-Archive -path C:\Users\testuser\Desktop\TestArchive\ ~\Desktop\TestArchive.zipArchive -path C:\Users\testuser\Desktop\TestArchive.zip ~\Desktop\TestArchive\ *A: Compress-Archive -path C:\Users\testuser\Desktop\TestArchive\ ~\Desktop\TestArchive.zip
Solution
The correct answer is A: Compress-Archive -path C:\Users\testuser\Desktop\TestArchive\ ~\Desktop\TestArchive.zip
This command uses the Compress-Archive cmdlet in Powershell to create a new archive, or zip file, from specified files. The -path parameter specifies the path to the files you want to archive, and the second part of the command specifies the destination of the new zip file.
Similar Questions
You have a compressed file named "archive.tar.gz" and you want to extract its contents to a directory named "backup." Which command should you use?1.0 Marksextract -z archive.tar.gz -d backupunzip archive.tar.gz backupextract archive.tar.gz -d backupgunzip archive.tar.gz -d backuptar -xzvf archive.tar.gz -C backup
You have downloaded a zip file from the Internet and need the files in a new folder named Project Files in your Documents folder. Explain the process for creating the new folder, finding the downloaded file, and extracting the files to the folder you created.
You have a compressed file named "archive.tar.gz" and you want to extract its contents to a directory named "backup." Which command should you use?1.0 Markstar -xzvf archive.tar.gz -C backupextract archive.tar.gz -d backupunzip archive.tar.gz backupextract -z archive.tar.gz -d backupgunzip archive.tar.gz -d backup
Which of the following commands extracts the contents of the compressed archive file1.tar.gz?
Your Bash script is intended to automate the process of compressing files. You want to use the highest level of compression. Which command should you use?1.0 Marks7z a -mx9 archive.7z /path/to/filesgzip -9 filename.txtzip -r9 archive.zip /path/to/filescompress -f9 filename.txttar -czvf archive.tar.gz /path/to/files
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.