Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could you help me do the commands from nmber 11 to 15 For this assignment, you w

ID: 3883234 • Letter: C

Question

Could you help me do the commands from nmber 11 to 15

For this assignment, you will: Unpack a tar archive, Change the unpacked files, Repack the files Into a new tar archive. Turn in your new tar archive. Details Do not use an editor unless it specifically states to edit the file. By 'editor' I mean vim, gedit, pico, etc. Despite its name, we don't consider sed to be an editor in this assignment, so you may use it freely. You will find a file named hw_3. tgz in -cs 155/pub: untar it in your home directory. It will create a directory called hw_3 files Go into the hw_3_files directory. Create a backup of the file story. txt, call it save-story Change the permissions of save-story so that everyone can read it, but nobody can write or execute it. Create a copy of story. txt but change all of the occurrences of "Alice" to "Marie Curie" and store this in a new file called story. Curie (do not use an editor-this is a one-line command). Find the one line in story, curie which contains exactly "und" but does not contain the letter "e" and put it in the file undie, txt (do not use an editor-this is a one-line command). Count the number of words in story. txt and append a line containing only that number to the end of undie.txt. Change the permissions of the file runme so that you can read, write and execute it, members of your group can read and execute it, and everyone else can only read it. Execute runme and put the output it produces into a file named runme. Out Edit the file runme and change the number 855 to 355. Execute runme again and put the output it produces into a file named runme.outout (do not use an editor). Find the differences between file_l. txt and file_2. txt and put them into a new file named file_3. txt (do not use an editor). Create a file named current. txt which contains the current time and date of the machine you are using, as reported by the date command (do not use an editor). Execute the file runme2 and append its output to the file current. txt (do not use an editor). Copy lines 20-31 of the file data. txt into a file named dozen (do not use an editor). Go into the dir_a directory. (You may need to change the permissions of the directory so that you can work in it.) Rename the file bad_name. txt to mal Delete the file remove_me. txt Return to your home directory. Create a tar file compressed with gzip named result, tgz which contains the hw_3_files directory. Turn in the result. tgz file.

Explanation / Answer

11. sh runme > runme.outout

Here sh runme executes runme file. > is output redirection symbol which redirects the output of sh runme to file runme.outout

12. diff file_1.txt file_2.txt > file_3.txt

Here, diff is used to find the difference between files file_1.txt and file_2.txt. The output of the command is saved in file_3.txt by using the output redirection symbol (>).

13. date > current.txt

Here date command outputs the current time and date of the machine used and output redirection symbol (>) writes the output of date to current.txt file.

14. sh runme2 >> current.txt

Here sh runme2 executes the file runme2 and append output redirection symbol (>>) appends the output of sh runme2 in the file current.txt

15. sed -n '20,31p' data.txt > dozen

Here -n option of sed command allows us o specify the line numbers, p option means we want to print lines 20-31 of file data.txt and output redirection symbol(>) means that the output is saved to file dozen

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote