DistributedNetworks DistributedNetworks


File Management  «Prev  Next»

Finding Unix Files - Exercise

Course project: Creating a link and finding files


Objective: Link a directory and create a list of project files.

Exercise scoring


You will receive 2 points for this exercise.

Submitting your exercise

This exercise is auto-scored. When you have finished, just click the Submit button to receive full credit.

Background/overview

In this exercise, you decide that it is easier to work with a project file when it resides in your home directory.
  1. You do not want to move the file, since that would alter the web site hyperlinks.
  2. And you do not want to copy the file, since that might create multiple versions.
  3. Instead you decide to create a symbolic link.
  4. As another file management task, you would like to create a list of your project files.
  5. You decide to use the find command to do this.

Instructions

  1. Log in to your course account.
  2. Type the script command to begin saving your UNIX session to a file named ex200-2: % script ex200-2
  3. Do a cd to the project directory, and list the qa directory. Notice the test_plan.html file.
  4. cd back to your home directory.
  5. Create a link to the project/qa/test_plan.html file.
    Name the link as you like; for example, plan.html.
  6. Use ls -F and ls -l to observe the results of the link.
  7. Now use the find command to list all files in the project directory, and save the results (redirect the output) to a new file named project_list, in your home directory.
  8. View the contents of project_list. Hint: use cat or more.
  9. Optional: Use the ls -R project command and compare this format to the output of find. Which format do you prefer?
  10. Type exit to end the script command.
  11. Log out when you are done.

Exercise Hints

If you enter the logout command, but it responds Not login shell, it means you forgot to end the script command. Type exit and then logout.