inls 461
Information Tools

Professor: Serena Fenton
School of Information and Library Science at UNC-Chapel Hill

Assignment: UNIX 1 - Introduction

The purpose of this assignment is to give you some practice accessing UNIX, and working with basic UNIX file system commands.

The product of this assignment will be a Wordpad .RTF document containing various text and screenshots as noted below.
Submit through Blackboard.

Download a copy of this gunzipped file: SyskillWebert.tar.gz

Open Wordpad and start your document to record the results of this assignment. Remember to save this document as .rtf

Use SSH to log onto your isis UNIX account.

  • Create a new directory specifically for this Project
  • Transfer a copy of SyskillWebert.tar.gz into that project directory. You may use any method to transfer the file, but since you will already be logged on using SSH, the SSH file transfer window will probably be the most convenient.

In your SSH window, at the UNIX command line:

  • Use the UNIX cd command to make the project directory your current working directory.
  • Use the UNIX pwd command to write the full pathname of your (new) working directory, and confirm that it is indeed your project directory.
  • Use the UNIX ls command with the -l option to list the files in your project directory, and confirm that SyskillWebert.tar.gz is indeed there. (The size of SyskillWebert.tar.gz should be 475802 bytes.)
  • Use the UNIX gunzip command to unzip the SyskillWebert.tar.gz file.
  • Use the UNIX ls command with the -l option to confirm that your project directory now contains only a SyskillWebert.tar file. (The size of SyskillWebert.tar should be 1736704 bytes, and SyskillWebert.tar.gz should be gone.)

Take a screenshot of your SSH window at this point, and place it in your Wordpad document as evidence that you have done this step. Make sure that the text in this screenshot is legible and shows all the commands and output above, including the cd into your project directory.

In your SSH window, still at the UNIX command line:

  • Use the UNIX tar command, with at least the -x and -f options, to extract the files and directories in the SyskillWebert.tar file.
    (If you need more information on using tar, try the man tar command to determine exactly how to use those options, and you may also wish to use more options, such as -v.)

Briefly describe what happened (and how you know that), and include this description in your Wordpad document.

Still in your SSH window, still at the UNIX command line:

  • Use the UNIX find command, with the -type option, to identify all directories and subdirectories that were created by the tar command above.
    (You may have to use the man find command to determine exactly how to use the -type option, and you may also have to use the -print option, depending on which version of UNIX you are running.)
  • Use the UNIX grep command to search all files in the Bands subdirectory of the SW directory for lines of text that contain the word Boston. (Hint: in your grep command, use * instead of a specific file name. What happens?)

Take another screenshot of your SSH window at this point, and place it in your Wordpad document as evidence that you have done this step. Make sure that the text in this screenshot is legible, and shows both the commands and the output for the find and grep commands above.

Still in your SSH window, still at the UNIX command line:

  • Use UNIX commands to determine how many files are in the Sheep subdirectory of the SW directory.
  • Briefly explain how you did this, and include the explanation in your Wordpad document.

Grading:

  • (25 points) Correct cd to project directory, correct pwd, correct ls showing details of SyskillWebert.tar.gz, correct unzip, and legible screenshot of the results.
  • (5 point) Credible description of tar command outcome.
  • (15 points) Correct find command, correct grep command, and legible screenshot of the results.
  • (5 point) Credible explanation of how many files are in the Sheep subdirectory.

If you are curious about this dataset, y ou can find more information about this data here: http://kdd.ics.uci.edu/databases/SyskillWebert/SyskillWebert.data.html


 


revised September 1, 2006