Open main menu

CDOT Wiki β

Changes

OPS235 Lab 3

112 bytes added, 14:23, 3 February 2020
m
Reverted edits by Andrew (talk) to last revision by Chris.johnson
'''Perform the following steps:'''
#Boot up your '''centos3''' VM.H
#Change your working directory to '''/usr/share/doc/sudo*'''
#Use the tar (tape archiver) command to create an archive file named "/tmp/archive1.tar" by issuing the following command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">tar cvf /tmp/archive1.tar .</span></code></b>
#Create the directory '''/tmp/extract1'''
#Change to the '''/tmp/extract1''' directory.
#Move the file '''archive1.tar.gz''' to your current directory.#Unzip the first archive you created by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">gunzip ../archive1.tar.gz</span></code></b>#Extract the files from the first archive by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">tar xvf ../archive1.tar</span></code></b>
#Are all the files there?
#Compare '''/tmp/extract1/README''' and '''/usr/share/doc/sudo*/README'''. Are they exactly the same? Why?
#Create the directory '''/tmp/extract2''' and #Move the file '''cdarchive2.tar.gz''' into itto the '''/tmp/extract2''' directory.
#Extract the files from the second archive by issuing the following command: <b><code><span style="color:#3366CC;font-size:1.2em;">tar xvzf /tmp/extract2/archive2.tar.gz</span></code></b>
#Note that this time a separate <b><code><span style="color:#3366CC;font-size:1.2em;">gunzip</span></code></b> command was not needed. Why?