Corning Community College CSCS1730 UNIX/Linux Fundamentals ~~TOC~~ ======Project: UNIX DATA RECOVERY (udr1)====== =====Errata===== Typos and bug fixes: * Please see the **README** file in the project directory (under the Public Directory)... I have offered up some optimizations that should reduce some of the common errors some are experiencing, along with a special version of data.file that, with a little extra prep-work, will allow for much faster processing. (20150314) =====Objective===== Practice and review your UNIX skills. =====Background===== The last project introduced us to many important concepts. It threw many people for a loop- it is still throwing some for a loop. But the concepts of offsets and quantities of data at an offset is an important thing to understand. With that, udr1 continues to play in that exciting realm, offering you another chance at getting more familiar with some very powerful UNIX tools. For those who have had the fortune of interacting with sequential access media (tape), you may have a natural advantage in being able to more quickly grasp the abstract concepts at work here. But even if you haven't-- these concepts are everywhere, especially on the computer, where we see it in the way software and operating systems work, to how hardware is organized and communicates with the rest of the system. I am also having you review your file permissions skills through the use of a tool called **urev**. However, it is currently unable to run, because it lacks a "gizmo", which is contained within the **data.file** you will be operating on. Extract and process **gizmo** appropriately, and then you can run **urev** and complete your file permission exercises (you have a week to do 96 exercises, but you are limited by how many you can do in one sitting, and there's a two hour time limit between sessions, so you'll also have to practice some time management). This is also intended for questions to be asked. I have have not reached critical mass on people asking questions for things. =====Obtain the file===== This week's project is located in the **spring2015/udr1/** directory of the UNIX Public Directory, in a file called: **data.file** Make a copy of this into your home directory somewhere and set to work. **NOTE:** Hopefully it has been standard practice to locate project files in their own unique subdirectory, such as under **src/unix/**, where you can then add/commit/push the results to your repository (you ARE regularly putting stuff in your repository, aren't you?) =====Process===== The data you seek (2 files) is obfuscated and contained within this file. Plain text directions give clues on how to find both pieces of information, and it is up to you to use your skills to extract the necessary data. Some additional information: * The first file should be named **udr1.text** and be properly oriented. * The second (big) file runs from the starting point until the very end of the file * It should be named 'gizmo', and reside in your current working directory. * gizmo is binary data, and entirely reversed- you need to get its bytes back in order (last byte should be first byte, 2nd to last should be 2nd, etc.) * You are to write a shell script to perform the de-reversal of the data, reading from data.file and through whatever processing is needed, produce the file called **gizmo**. * The **urev** tool has some additional constraints with respect to gizmo... running it should notify you of any details you are lacking. =====Useful tools===== You may want to become familiar with the manual pages of the following tools (in addition to tools you've already encountered): * **dd**(1) * **bc**(1) * **du**(1) * **bash**(1) shell scripting * **od**(1) * **bvi**(1) * **hexedit**(1) ... along with other tools previously encountered. =====Submission===== Successful completion will result in the following criteria being met: * Resulting file with proper settings should enable you to run **urev** tool. * You have completed all weekly exercises (96, I think) before the deadline, being mindful of the intentionally-paced nature of urev. * Bonus opportunity: while still performing a minimum of 3 distict **urev** sessions, how could you get around the urev-imposed time limit? (Without copying/changing urev). * When all is said and done, you will submit 3 files: * **udr1.text** * Append the dd line(s) as well as any other command lines needed to extract and properly re-orient the file. Also be sure to indicate what is in the file you found (content, not just type of data). * your bash script enabling the processing of data.file to produce gizmo * Be sure to include comments indicating the reasoning behind actions taken * Your extracted/processed **gizmo** file ====Submit==== Please submit as follows: lab46:~/src/unix/udr1$ submit unix udr1 udr1.text getgizmo.bash gizmo Submitting unix project "udr1": -> udr1.text(OK) -> getgizmo.bash(OK) -> gizmo(OK) SUCCESSFULLY SUBMITTED lab46:~/src/unix/udr1$