User Tools

Site Tools


user:swilli31:portfolio:archives

Project: ARCHIVE HANDLING

A project for CSCS1730 UNIX/Linux Fundamentals by Stephanie R. Williams during the Fall semester 2011

This project was begun on October 25 and is anticipated to take 2 days. This project was completed on October 27.

Objectives

To demonstrate familiarity with archiving and compression tools.

Prerequisites

In order to successfully accomplish/perform this project, the listed resources/experiences need to be consulted/achieved:

  • ability to use the command-line
  • familiarity with looking up information and documentation
  • understanding what files are

Background

The purpose of this project is to uncompress, extract, and compress archived files.

Archives are another way of storing files in a compressed format so that they will take up less space on the hardrive. The most common form of archive is a tape archive, or tar. A tar file can be compressed and compressed again in another format so that the file takes up even less space and is far more efficient. The more common forms of compression are gzip, a .gz extension, and bzip2, a .bz2 extension.

Scope

In /var/public/unix/archives are two files: archive1.tar.gz and archive2.zip

The mission is to:

  • make a copy of them to your home directory
  • figure out how to properly extract each one
  • view the contents
  • create a new archive containing the contents of both extracted original archives
  • compress your new archive in bzip2 format
  • document the entire process to clearly demonstrate this on project document

Attributes

The attributes I would like to receive upon completion of this project are:

  • commands: using various archiving and compression commands
  • files & directories: understanding files and directories

Procedure

lab46:~$ cd /var/public/unix/archives
lab46:~var/public/unix/archives$ cp -r archive1.tar.gz /home/swilli31
lab46:~var/public/unix/archives$ cp -r archive2.zip /home/swilli31
lab46:~var/public/unix/archives$ cd
lab46:~$ unzip archive2.zip
lab46:~$ tar -zxf archive1.tar.gz
lab46:~$ tar -cf archive3.tar archives
lab46:~$ tar -jcf archive4.tar.bz2 archive3.tar

Reflection

I was tripped up a few times during this project. The first issue I had was extracting the information from archive1.tar.gz. I was having difficulty figuring out the proper commands. The next stumbling block came tring to take the files in both and add them to a single archive. I didn't realize they were all in the directory archives. My final up hill battle was to compress the archive into bzip2 format. Again, it was command arguments I had trouble with. I need to do more playing with archives and the tar command and its arguments.

References

user/swilli31/portfolio/archives.txt · Last modified: 2011/10/27 15:56 by swilli31