Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

UNIX and Shell Programming: Please do all sessions so I can check my work. If you must pick then do Sessions 3 and 4. Session

UNIX and Shell Programming: Please do all sessions so I can check my work. If you must pick then do Sessions 3 and 4.

image text in transcribedimage text in transcribed

Session I. Log into the system. 2. Create three directories named letters, reports, and assignments under your home directory. 3. Move to directory letters. 4. Create two directories named friendly and formal under the letters directory 5. Move to directory reports using only one command (directly from letters). 6. Create three directories called personal, business, and school under the directory reports (use only one command). 7. Create a directory called UNIX under the assignments directory without moving from the reports directory 8. Create two directories called Hws and Projects under directory UNIX. The directories in this step should be created without moving from the reports directory 9. Move to your home directory. 10. Recursively list all of the directories you created and draw the directory structure on paper 11. Log out of the system. Session II 1. Log into the system. 2. Recursively list the directories under your home directory (the ones created in Session I) 3. Move to the UNIX directory. 4. Check your current directory. 5. Using vi, create a file named hw4 that contains short answers to at least five review questions in this chapter 6. Save the file (it should be saved under the UNIX directory). 7. Move to your home directory. 8. Print the content of hw from your home directory 9. Make a copy of hw4 and call it hw4.bk. Store it under the same directory where hw4 is stored. 10. From your home directory, check to see if both files (hw4 and hw4.bk) exist. 11. Move to the UNIX directory 12. Check your current working directory 13. Make a hard link to the hw4 file. The link should be under the UNIX subdirectory and be called hw4HL. 14. Make a soft link to hw4 called hw4SL and store it under the UNIx directory. 15. Check the inode of hw4, hw4.bk, hw4HL, and hw4SL. Are all the same? Are all different? Explain how you determined the answer. 16. Use the ls command to find the file types of hw4, hw4.bk, hw4HL, and hw4sL Explain your observation. Session III I. Log into the system. 2. Create a backup directory in your home directory called backups. 3. Use the find command to find the pathnames of all of the files (hw4, hw4.bk,h and hw4SL) that you created in Session II. All of them should be found using onlu find command. The command must also copy all of them to the backups di 4. Check the number of links and inode number of hw4, hw4.bk, hw3HL, and hw4SL. Make note of the results. 5. Delete the original hw4 file without moving from your home directory Check the existence of hw4, hw4.bk, hw4HL, and hw4SL. 7. Check the contents of hw4, hw4.bk, hw4HL, and hw4SL 8. Restore the file hw4 by making a copy of hw4.bk. 9. You may have noticed that your soft link (hw4SL) contains garbage. Delete this file. 10. Make a new soft link to hw4 and store it as hw4SL under the same directory as it was 11. List recursively all of your files and directories to confirm all operations. 13. Log out of the system. Session IV 1. Log into the system. 2. Use wildcards to display all of the files you have created under the Hws directory without moving from your home directory 3. Rename hw4.bk to hw4.bak. 4. Create a short friendly letter, called friend.1, using vi and store it under the friendly directory 5. Create a short formal letter, called formal.1, using vi and store it under the formal directory. Give a title to formal.1 letter 6. Copy the file formal.1 and call the new copy formal.2. 7. Change only the title of formal.2 (using vi) and store it. 8. Using wildcards, print the contents of formal.1 and formal.2. 9. Make a directory called bustetters under your home directory 10. Move the formal directory (with all of its contents) under the busLetter directory 11. Make a recursive list of your directory structure. 12. Draw the new directory structure on paper. 13. Log out of the system Session I. Log into the system. 2. Create three directories named letters, reports, and assignments under your home directory. 3. Move to directory letters. 4. Create two directories named friendly and formal under the letters directory 5. Move to directory reports using only one command (directly from letters). 6. Create three directories called personal, business, and school under the directory reports (use only one command). 7. Create a directory called UNIX under the assignments directory without moving from the reports directory 8. Create two directories called Hws and Projects under directory UNIX. The directories in this step should be created without moving from the reports directory 9. Move to your home directory. 10. Recursively list all of the directories you created and draw the directory structure on paper 11. Log out of the system. Session II 1. Log into the system. 2. Recursively list the directories under your home directory (the ones created in Session I) 3. Move to the UNIX directory. 4. Check your current directory. 5. Using vi, create a file named hw4 that contains short answers to at least five review questions in this chapter 6. Save the file (it should be saved under the UNIX directory). 7. Move to your home directory. 8. Print the content of hw from your home directory 9. Make a copy of hw4 and call it hw4.bk. Store it under the same directory where hw4 is stored. 10. From your home directory, check to see if both files (hw4 and hw4.bk) exist. 11. Move to the UNIX directory 12. Check your current working directory 13. Make a hard link to the hw4 file. The link should be under the UNIX subdirectory and be called hw4HL. 14. Make a soft link to hw4 called hw4SL and store it under the UNIx directory. 15. Check the inode of hw4, hw4.bk, hw4HL, and hw4SL. Are all the same? Are all different? Explain how you determined the answer. 16. Use the ls command to find the file types of hw4, hw4.bk, hw4HL, and hw4sL Explain your observation. Session III I. Log into the system. 2. Create a backup directory in your home directory called backups. 3. Use the find command to find the pathnames of all of the files (hw4, hw4.bk,h and hw4SL) that you created in Session II. All of them should be found using onlu find command. The command must also copy all of them to the backups di 4. Check the number of links and inode number of hw4, hw4.bk, hw3HL, and hw4SL. Make note of the results. 5. Delete the original hw4 file without moving from your home directory Check the existence of hw4, hw4.bk, hw4HL, and hw4SL. 7. Check the contents of hw4, hw4.bk, hw4HL, and hw4SL 8. Restore the file hw4 by making a copy of hw4.bk. 9. You may have noticed that your soft link (hw4SL) contains garbage. Delete this file. 10. Make a new soft link to hw4 and store it as hw4SL under the same directory as it was 11. List recursively all of your files and directories to confirm all operations. 13. Log out of the system. Session IV 1. Log into the system. 2. Use wildcards to display all of the files you have created under the Hws directory without moving from your home directory 3. Rename hw4.bk to hw4.bak. 4. Create a short friendly letter, called friend.1, using vi and store it under the friendly directory 5. Create a short formal letter, called formal.1, using vi and store it under the formal directory. Give a title to formal.1 letter 6. Copy the file formal.1 and call the new copy formal.2. 7. Change only the title of formal.2 (using vi) and store it. 8. Using wildcards, print the contents of formal.1 and formal.2. 9. Make a directory called bustetters under your home directory 10. Move the formal directory (with all of its contents) under the busLetter directory 11. Make a recursive list of your directory structure. 12. Draw the new directory structure on paper. 13. Log out of the system

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions