Open main menu

CDOT Wiki β

Changes

OPS235 Lab 3 - CentOS7

377 bytes removed, 14:17, 28 April 2015
no edit summary
===Part 2: Restoring Files From an Archive===
#Remain in your '''centos3''' VM.
#Create the directory <b><code><span style="color:#3366CC;font-size:1.2em;">'''/tmp/extract1</span></code>'''</b>#Change to the <b><code><span style="color:#3366CC;font-size:1.2em;">'''/tmp/extract1</span></code></b> ''' directory.#Move the file '''archive1.tar.gz ''' to your current directory.
#Unzip the first archive you created:
#*<b><code><span style="color:#3366CC;font-size:1.2em;">gunzip archive1.tar.gz</span></code></b>
#*<b><code><span style="color:#3366CC;font-size:1.2em;">tar xvf archive1.tar</span></code></b>
#Are all the files there?
#Compare <b><code><span style="color:#3366CC;font-size:1.2em;">'''/tmp/extract1/README</span></code></b> ''' and <b><code><span style="color:#3366CC;font-size:1.2em;">'''/usr/share/doc/sudo*/README</span></code></b>'''. Are they exactly the same? Why?#Create the directory <b><code><span style="color:#3366CC;font-size:1.2em;">'''/tmp/extract2</span></code></b>'''#Move the file '''archive2.tgz ''' to the <b>'''/tmp/extract2</b> ''' directory.
#Extract the files from the second archive:
#*<b><code><span style="color:#3366CC;font-size:1.2em;">tar xvzf /tmp/extract2/archive2.tgz</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?
#Repeat the previous command, leaving out the option "'''z"'''. Does it work? Why?#Compare the <b><code><span style="color:#3366CC;font-size:1.2em;">'''README</span></code></b> ''' file in this directory with the original file. Are they exactly the same?
'''Answer Part 2 observations / questions in your lab log book.'''
13,420
edits