Write and execute basic Linux command lines. Required Reading Linux – Chapters 1-3 Instructions For this assignment, you will need to log in to the Linux server, create some files, and execute a sequence of commands. You must hand in a transcript of your session as a text file generated by the script command.Create a file called words1.txt consisting of the following words in the following order, each on its own line: palindrome avocado tarantula nettle lemonade development avocado farthing Create a file called words2.txt consisting of the following words in the following order, each on its own line: palindrome tension avocado tarantula xylophone lemonade development avocado javelina godspeed 1 Once you have created these two files, use the script command to record the next part of your session.Execute commands that do the following (in this order): 1. Display the contents of words1.txt immediately followed by the contents of words2.txt without any gap between them using a single command. 2. Compare the two files and display the differences between them. 3. Display the contents of words1.txt in sorted order. 4. Display the contents of words2.txt in sorted order. 5. Display the contents of words1.txt in sorted order without duplicates. 6. Display the contents of words2.txt in sorted order without duplicates. 7. Display the first four lines of words1.txt. 8. Display the last four lines of words1.txt. 9. Display the first four lines of words1.txt in sorted order. 10. Sort words1.txt and display the first four lines of the sorted results. (Note that this is asking for something different than problem 9.) When you have executed all of these commands, type exit to exit the script program.Your session should be captured in a file called typescript. This file will contain everything you typed including characters you deleted and the backspace characters that deleted them. To make this look better execute the following command with your actual last name substituted for yourlastname: cat typescript > yourlastnameAssign1.txt Writing Text Files The easiest way to create a text file on Linux is to use a text editor. The simplest text editor available is probably nano, which can be started by typing nano at the command line.You can then write the text file, type control-o to save it, and control-x to exit the program. You can also open an existing file by typing nano at the command line (with the actual name of the file instead of .) What to Hand In Download yourlastnameAssign1.txt to your local machine, then upload it to D2L in the dropbox labelled Assignment 1. 2
Reviews
There are no reviews yet.