Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tasks Please answer the following questions using a text editor in your Linux account on the course server. Create a plain text (.txt) document called

image text in transcribed

Tasks Please answer the following questions using a text editor in your Linux account on the course server. Create a plain text (.txt) document called file_lab2.txt. For details on the Vi text editor, please see the Text Editor notes. There are also two Vi reference documents on D2L, under Materials / Content / References 1. What are 2 applications / advantages of hard-links? 2. Suppose that you have some programs located in \$HOME/progs and you plan to move these into \$HOMEetwork/progs. The problem is, users expect the programs to be the original directory. What can you do? 3. What is a fast symbolic link? 4. What is a Dangling symbolic link? 5. How can you determine if a program has been executed today? 6. Show how the find command can locate all files in your home directory that have the .txt or.TXT extensions. Use -name option to specify the pattern: 7. Show how the find command can locate all files in your home directory that have permissions of 666. 8. Show how the find command can locate all files in your home directory that were modified yesterday. 9. Show how the find command can locate the file login.sql in the /oracle directory tree, copying it to your home directory (all in one find command). 10. You are using the "find" command to locate a file in a directory that contains other directories for which you have no read permission. As a result, your screen gets filled up with "Permission denied" error messages. How can you use "redirection" to ignore these messages? 11. Show the command to archive and compress a file in one command without an intermediate file. 12. What are the permissions of your home directory set by your instructor? What command did you use to find out? 13. For files and directories given above, show permissions as octal numbers. 14. Change directory (cd) to your home directory. Create a directory called temp and set its permissions to execute only. Run 1s1d temp. Next run 1s1 temp. What happens? Does it make sense to you? 15. What are the minimum permissions required on the temp directory in the prior exercise for 1s1 temp to execute successfully? Set them accordingly and then re-try 1 s 1 temp. Show your session. With permissions of 400 , the command will access the directory, but the internal files will not provide data. Therefore, use 500. 16. Create a directory, temp2. Use 1s -1d temp2 command to determine the permissions of temp2. Next, use the id command to determine your current group id (gid). Run the command newgrp csci1180 and then create another directory, temp3. Use the id command and 1s1d temp3 to show the effects of the newgrp command. (Group csci1180 is on the course server.) 17. Use the we command with the /etc/passwd file to determine how many accounts exist on the course server. How many accounts does the command head /etc/passwd reveal? Use the command cat -n /etc/passwd to determine the line number of your account. Show your commands and results. 18. Combine the head and tail commands to list just the line for your account in the prior exercise. Hint: head and tail can take a numeric argument. Show your commands and result. 19. With your user id, execute the command getent passwd userid. How does the getent command relate to the contents of the /etc/passwd file? When do you think it would be better to use the getent command instead of the /etc/passwd file? You may want to read the man page to determine this. What to upload Upload your file file_lab2.txt on D2L to Assessments / Assignments / Labs/Lab-2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

2. To compare the costs of alternative training programs.

Answered: 1 week ago