Classwork 1

This classwork will give you some practice using basic bash commands, interfacing with the Unix File System, and understanding links and inodes!


Problem 1


List the bash commands, in order, that you use to create the two text files depicted below, as well as their associated links.

Note: assume that "YourUserName" is replaced with whatever your account's user name is in reality.

Add whatever amusing text you want to Secrets.txt and SSN.txt, but ensure that they are not empty.


Problem 2


List the bash commands used to find the inode index numbers for each of the two text files and their associated links, then answer the following questions / tasks.

  1. Which inode index numbers correspond and why?

  2. Using the links created, list the commands you used to edit the contents of each linked text file, and then make some edits to their contents.

  3. List the commands used to compare the contents of the .txt files and the contents of those files associated with each link. Are they different? Why or why not?


Problem 3


Provide the commands for renaming Secrets.txt to UltraSecrets.txt, and SSN.txt to NSA.txt, then answer the following questions / tasks.

  1. Did the inode index numbers associated with each text file change after the rename? Why or why not?

  2. After renaming the .txt files, provide a command for paging through the files' contents through their associated links.

  3. Which link(s) still operate as intended (i.e., still exist as valid links to their associated text files)? Explain.


Problem 4


Perform the following tasks, in order, and determine *after which commands* each of the files will have their memory freed.

  1. Delete UltraSecrets.txt

  2. Delete NSA.txt

  3. Delete Link2Secrets

  4. Delete Link2SSN



Submission

How

This one's easy: just turn it in on paper!


What

At the top of the paper, include:

  • Names of all Group Members (Up to 4)

  • Name / Number of the Classwork

  • Associated Lecture Date

Make sure to number your responses to the problems above. If a problem has sub-components, use a nested numbering scheme like 1.2 to indicate an answer to problem 1, sub-component 2.



  PDF / Print