Intro to Unix

Assignment: File Festival

The purpose of this assignment is to establish, refine, and demonstrate your ability to manage directories and files.

The Assignment

For security and administrative reasons, you must use the Unix account supplied to you by the University to prepare and email your assignment--failure to do so will result in your assignment not being graded.

In this assignment, you will create a file and directory structure, record it using a listing command and output redirection, and then change the structure and record its change with another listing command.

  1. In your home directory, create a directory called filefest.

  2. Inside this directory filefest, create set of directories and files as shown in the following diagram. Use the Unix command mkdir to create a directory. Use whatever means you would like to make the files, such as output redirection or the Unix touch command. The contents of the files can be anything (or empty), but they must be plain text files, and you must use the exact names as shown in the diagram.

    filefest diagram--before

    In this diagram, there are three directories under filefest: pigstage, northgate, and rockstage. In pigstage, there are two files: kelly and nicole. In northgate, there is one file: john. In rockstage, there are two files--deni and kyle--and one directory, bleachers. In bleachers, there is one file, kevin.

  3. In the filefest directory, look at the directory structure you have created by using the Unix list command ls -lR.

    Here is an example that I did and how it looked. I did a pwd command at the start to show the present working directory when I did the ls -lR command.

    $ pwd
    /users/aux/adjunct/johnd/filefest
    $ ls -lR
    total 3
    drwx------   2 johnd         512 Mar  6 06:34 northgate
    drwx------   2 johnd         512 Mar  6 06:33 pigstage
    drwx------   3 johnd         512 Mar  6 06:34 rockstage
    
    northgate:
    total 0
    -rw-------   1 johnd           0 Mar  6 06:34 john
    
    pigstage:
    total 0
    -rw-------   1 johnd           0 Mar  6 06:33 kelly
    -rw-------   1 johnd           0 Mar  6 06:33 nicole
    
    rockstage:
    total 1
    drwx------   2 johnd         512 Mar  6 06:34 bleachers
    -rw-------   1 johnd           0 Mar  6 06:34 deni
    -rw-------   1 johnd           0 Mar  6 06:34 kyle
    
    rockstage/bleachers:
    total 0
    -rw-------   1 johnd           0 Mar  6 06:34 kevin
    $
    

  4. Still in the filefest directory, do the ls -lR command again, but this time redirect the output of this ls -lR command to a file called listing.

  5. Now move all the files in the directories pigstage (kelly and nicole), rockstage (deni and kyle), and bleachers (kevin) to northgate.

  6. Now delete the directories pigstage, rockstage, and bleachers.

    Once you have moved the files and deleted the directories, you would have this structure:

    filefest diagram--after

  7. Still in the filefest directory, use the ls -lR again to look at the new file structure you have.

  8. Still in the filefest directory, append the output of this ls -lR command to the file listing.

  9. Your assignment is to email the contents of the file listing that you created. This will show your directory and file structure "before" and "after" moving the files and deleting the directories.

Remember, check for a receipt from me to make sure that I received your assignment before you consider the assignment done--remember "It's not complete until you get your receipt!"

Grading

Your assignment will be graded according to criteria I set up for this tutorial.

For the 60% content score,

Turning in Your Assignment

Your assignment is due by the time listed on the syllabus. Use these procedures for turning in your assignment. Your assignment will be graded according to criteria I set up for this tutorial.

Save this page to any social bookmarking site! Share · search Search · store Market · star Directory
2017-05-11 · John December · Contact · Terms of Use © December Communications, Inc.