This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2014:unix:projects:archive_handling [2014/01/20 21:48] – [Procedure] wedge | haas:spring2014:unix:projects:archive_handling [2014/02/04 19:36] (current) – wedge | ||
---|---|---|---|
Line 44: | Line 44: | ||
=====Procedure===== | =====Procedure===== | ||
- | COMING SOON | + | In the UNIX Public Directory you will find a **projects/ |
- | =====Execution===== | + | |
- | Several operating behaviors are shown, namely, with and without command-line arguments and 1-, 2-, and 3-digit values. | + | |
- | < | + | There you will find two existing archives: |
- | lab46:~/ | + | |
- | Enter value: 345 | + | |
- | 345 x 11 = 3795 | + | |
- | lab46: | + | |
- | </ | + | |
- | The execution | + | * archive1.zip |
+ | * archive2.tar.bz2 | ||
+ | |||
+ | You'll probably want to make a copy of these to some working directory in your home directory. | ||
+ | |||
+ | Essentially, | ||
+ | |||
+ | - Figure out the format of each archive, and read up on the available tools for manipulating them | ||
+ | - Extract the contents of the two archives and study them (make sure you keep track of what is in which archive) | ||
+ | - Analyze the archive contents | ||
+ | | ||
+ | * name the files smallest, small, big, biggest, and tack on the appropriate extension | ||
+ | * the smallest file will be whichever file represents the smallest/ | ||
+ | - Create a new archive, called **myarchive.tar** containing only these size-themed files. | ||
+ | * do NOT store any paths in the archive, just put the files at base level | ||
+ | - Compress **myarchive.tar** on second highest (on the best, not fastest end of the spectrum) compression level in gzip to create the appropriately named **myarchive.tar.gz** | ||
+ | * also use the **-n** argument to aid in the verification step below | ||
+ | - Submit **myarchive.tar.gz** using the submit tool. | ||
=====Reflection===== | =====Reflection===== | ||
Be sure to provide any commentary on your opus regarding realizations had and discoveries made during your pursuit of this project. | Be sure to provide any commentary on your opus regarding realizations had and discoveries made during your pursuit of this project. | ||
- | * Does this process work for four digit numbers? | + | * Why do you suppose tar works the way it does? |
- | * How about five digit numbers? | + | * What might be some benefits of separating archival and compression functionality? |
- | * Do you see a pattern for now this trick could be extended? | + | |
=====Submission===== | =====Submission===== | ||
To successfully complete this project, the following criteria must be met: | To successfully complete this project, the following criteria must be met: | ||
- | | + | * Submit a copy of your archive |
- | * Executed program must display a total of 1 or 2 lines (depending on presence of argument) | + | |
- | * Output must be correct, and match the form given in the sample output above. | + | |
- | * Code must be nicely and consistently indented (you may use the **indent** tool) | + | |
- | * Code must be commented | + | |
- | * have a properly filled-out comment banner at the top | + | |
- | * have at least 20% of your program consist of **< | + | |
- | * Output Formatting (including spacing) of program must conform to the provided output (see above). | + | |
- | * Track/ | + | |
- | | + | |
To submit this program to me using the **submit** tool, run the following command at your lab46 prompt: | To submit this program to me using the **submit** tool, run the following command at your lab46 prompt: |