Unix and shell commands
1.(4 pts) What needs to be the very first line of a shell script?
2.(12 pts) Shell scripts can use special shell characters. Provide the special character(s) that indicate(s)….
a)the beginning of a shell variable name.
b)all characters a through z.
c)characters x or y
d)a command to match on one character
3.(4 pts) How can you change from the current shell into a C shell? Give the appropriate command.
4.(4 pts) Where can you find what shells are available on your system?
5.(4 pts) Define an alias called ‘checkcron’ for the command ps –ef | grep cron.
6.(8 pts) Is it possible to string a list of commands separated by the | (pipe) command that uses up 140 characters?
If your answer is yes, explain how.
If your answer is no, explain why?
7.(8 pts) Given the following information, what output is produced by the command listed below:
$ echo $HOME
$ env | grep HOME | wc
8.(8 pts) Related to text and script files
a)What’s the difference in permissions between a plain text file and a script?
b)Compose a command to make a text file named “checkdisks” into a script?
9.(4 pts) What two characteristics tell you a one-word variable name is an environment variable?
10.(4 pts) Compose a command to search the directory you are in for a file named batchlog for the word ‘error1’. If the batchlog file is not found, echo an the error message “file not found”
11.(4 pts) Compose a command to generate a list of all active processes, search for ‘daemon’ within them, and then display the results one page at a time.
12. (4 pts) What is meant by the word daemon in Linux?
13.(4 pts) Compose a command to take the boot log (from dmesg), search for eth1 and display only the last five matches.
14.(4 pts) Compose a command to find the disk usage for every directory in the system, sort them in descending order, then save the top ten entries in a file called ‘worst disk hogs’.
15.(4 pts) Compose a command to create a summary of disk usage by ‘jones’ along with the time and date of the last modification of any file in the directory or sub-directories and append it to the file ‘jones disk usage history’.
16.(4 pts) Why may a system engineer be interested in both the disk usage and the last modification date for the user jones?
17.(4 pts) Where does cd ~ put you?
18. (12 pts) This question is about the tar command. Use the commands in the Given section to help you answer the questions.
$ ls –l photos
photo photo0 photo1 photo2 photo3 photo4 photo5 photo6 photo7
a) What does this command do?
$ tar cvf vacation.tar photos
b) What alternate tar command can you construct that will save disk space?
TO ORDER FOR THIS QUESTION OR A SIMILAR ONE, CLICK THE ORDER NOW BUTTON AND ON THE ORDER FORM, FILL ALL THE REQUIRED DETAILS THEN TRACE THE DISCOUNT CODE,
TYPE IT ON THE DISCOUNT BOX AND CLICK ON ‘USE CODE’ TO EFFECT YOUR DISCOUNT. THANK YOU
Our Service Charter
Excellent Quality / 100% Plagiarism-FreeWe employ a number of measures to ensure top quality essays. The papers go through a system of quality control prior to delivery. We run plagiarism checks on each paper to ensure that they will be 100% plagiarism-free. So, only clean copies hit customers’ emails. We also never resell the papers completed by our writers. So, once it is checked using a plagiarism checker, the paper will be unique. Speaking of the academic writing standards, we will stick to the assignment brief given by the customer and assign the perfect writer. By saying “the perfect writer” we mean the one having an academic degree in the customer’s study field and positive feedback from other customers.
Free RevisionsWe keep the quality bar of all papers high. But in case you need some extra brilliance to the paper, here’s what to do. First of all, you can choose a top writer. It means that we will assign an expert with a degree in your subject. And secondly, you can rely on our editing services. Our editors will revise your papers, checking whether or not they comply with high standards of academic writing. In addition, editing entails adjusting content if it’s off the topic, adding more sources, refining the language style, and making sure the referencing style is followed.
Confidentiality / 100% No DisclosureWe make sure that clients’ personal data remains confidential and is not exploited for any purposes beyond those related to our services. We only ask you to provide us with the information that is required to produce the paper according to your writing needs. Please note that the payment info is protected as well. Feel free to refer to the support team for more information about our payment methods. The fact that you used our service is kept secret due to the advanced security standards. So, you can be sure that no one will find out that you got a paper from our writing service.
Money Back GuaranteeIf the writer doesn’t address all the questions on your assignment brief or the delivered paper appears to be off the topic, you can ask for a refund. Or, if it is applicable, you can opt in for free revision within 14-30 days, depending on your paper’s length. The revision or refund request should be sent within 14 days after delivery. The customer gets 100% money-back in case they haven't downloaded the paper. All approved refunds will be returned to the customer’s credit card or Bonus Balance in a form of store credit. Take a note that we will send an extra compensation if the customers goes with a store credit.
24/7 Customer SupportWe have a support team working 24/7 ready to give your issue concerning the order their immediate attention. If you have any questions about the ordering process, communication with the writer, payment options, feel free to join live chat. Be sure to get a fast response. They can also give you the exact price quote, taking into account the timing, desired academic level of the paper, and the number of pages.