Name: Anonymous 2011-03-07 4:24
Can any linux admin, or someone who knows how to do this help me?
1. Write a sequence of commands that find all appearances of file 'core' on the system. Output of the commands needs to be saved in a file '~/corefiles'. Printing of the errors that may be arisen during an execution of the commands needs to be ignored. In the output file for Moodle you need to attach the corresponding sequence of commands and the content of the file 'corefiles'. Answer to the following questions:
a) what mean has the file 'core' on the Linux system?
b) when it is arisen?
2 Write a sequence of commands that from the file '/etc/passwd' prints names of all users on the system sorted according to their lexicographic order. The users need to be listed on the console, then counted and at the end a status line with the following text "On the system is n users" should be printed. Note that n represents the number of users on the system. In addition, answer to the following questions:
a) what mean has the file '/etc/passwd' on the Linux systems?
b) how it is structured?
Guideline: counting of user must be performed with the quotation, i.e. orders comprised with '`'.
3 Write a sequence of commands that prints active processes of the user that is currently logged on the system. You need to print all processes, determine their count and at the end, display a status line with the text "An user u was activated n processes". Here, the variable u determines the user name and n the number of active processes. To display the status line, the quotation operations need to be used. Additionally, the regular expressions should be used by filtering of processes.
1. Write a sequence of commands that find all appearances of file 'core' on the system. Output of the commands needs to be saved in a file '~/corefiles'. Printing of the errors that may be arisen during an execution of the commands needs to be ignored. In the output file for Moodle you need to attach the corresponding sequence of commands and the content of the file 'corefiles'. Answer to the following questions:
a) what mean has the file 'core' on the Linux system?
b) when it is arisen?
2 Write a sequence of commands that from the file '/etc/passwd' prints names of all users on the system sorted according to their lexicographic order. The users need to be listed on the console, then counted and at the end a status line with the following text "On the system is n users" should be printed. Note that n represents the number of users on the system. In addition, answer to the following questions:
a) what mean has the file '/etc/passwd' on the Linux systems?
b) how it is structured?
Guideline: counting of user must be performed with the quotation, i.e. orders comprised with '`'.
3 Write a sequence of commands that prints active processes of the user that is currently logged on the system. You need to print all processes, determine their count and at the end, display a status line with the text "An user u was activated n processes". Here, the variable u determines the user name and n the number of active processes. To display the status line, the quotation operations need to be used. Additionally, the regular expressions should be used by filtering of processes.