Homework Solution: I need help in doing these commands:…

    I need help in doing these commands:
    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. 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. 1. You will find a file named hw3.tgz in -csl55/pub: untar it in your home directory. It will create a directory called hw3_files 2. Go into the hw3_files directory. 3. Create a backup of the file story.txt, call it save-story 4. Change the permissions of save-story so that everyone can read it, but nobody can write or execute it. 5. 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). 6. 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). 7. Count the number of words in story.txt and append a line containing only that number to the end of undie.txt. 8. 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. 8. Execute runme and put the output it produces into a file named runme. out 9. Edit the file runme and change the number 855 to 355. 11. Execute runme again and put the output it produces into a file named runme.outout (do not use an editor). 12. Find the differences between file_1.txt and file_2.txt and put them into a new file named file_3.txt (do not use an editor). 13. 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). 14. Execute the file runme2 and append its output to the file current.txt (do not use an editor). 15. Copy lines 20-31 of the file data.txt into a file named dozen (do not use an editor). 16. Go into the dir_a directory. (You may need to change the permissions of the directory so that you can work in it.) 17. Rename the file bad_name.txt to 18. Delete the file remove_me.txt 19. Return to your home directory. 20. Create a tar file compressed with gzip named result.tgz which contains the hw3_files directory. 21. Turn in the result.tgz file. At some point, you may decide that you've done something wrong, and want to start over. You'll want to get rid of the hw3_files directory, but you may have trouble removing it, due to file permissions. Here's a cheap way to get rid of it: mv hw3_files hw3_files.bogus

    Expert Answer

     
    mkdir ~/hw3

    I deficiency aid in doing these orders:

    For this ordinance, you gain: Unpack a seaman archive. Modify the unpacked rasps. Repack the rasps Into a odd seaman archive. Turn in your odd seaman archive. Do referable verification an editor probable it specifically states to edit the rasp. By “editor” I balance vim.gedit, pico, etc. Despite its spectry, we don’t investigate sed to be an editor in this ordinance, so you may verification it spontaneously. 1. You gain perceive a rasp spectryd hw3.tgz in -csl55/pub: unseaman it in your residence directory. It gain begain a directory denominated hw3_files 2. Go into the hw3_files directory. 3. Begain a backup of the rasp legend.txt, fawn it save-legobject 4. Modify the permissions of save-legobject so that everysingle can discbalance it, referablewithstanding nobody can transcribe or enact it. 5. Begain a vision of legend.txt referablewithstanding modify integral of the occurrences of “Alice” to “Marie Curie” and stock this in a odd rasp denominated legend.curie (do referable verification an editor-this is a single-verse order). 6. Perceive the single verse in legend, curie which comprehends accurately “und” referablewithstanding does referable comprehobject the missive “e” and sprecognize it in the rasp undie.txt (do referable verification an editor-this is a single-verse order). 7. Count the sum of articulation in legend.txt and affix a verse comprehending simply that sum to the object of undie.txt. 8. Modify the permissions of the rasp runme so that you can discover, transcribe and enact it, members of your cluster can discbalance and enact it, and everysingle else can simply discbalance it. 8. Enact runme and sprecognize the extinguishedsprecognize it produces into a rasp spectryd runme. extinguished 9. Edit the rasp runme and modify the sum 855 to 355. 11. Enact runme intermittently and sprecognize the extinguishedsprecognize it produces into a rasp spectryd runme.outextinguished (do referable verification an editor). 12. Perceive the differences between rasp_1.txt and rasp_2.txt and sprecognize them into a odd rasp spectryd rasp_3.txt (do referable verification an editor). 13. Begain a rasp spectryd vulgar.txt which comprehends the vulgar opportunity and epoch of the implement you are using, as reported by the epoch order (do referable verification an editor). 14. Enact the rasp runme2 and affix its extinguishedsprecognize to the rasp vulgar.txt (do referable verification an editor). 15. Vision verses 20-31 of the rasp basis.txt into a rasp spectryd dozen (do referable verification an editor). 16. Go into the dir_a directory. (You may deficiency to modify the permissions of the directory so that you can effort in it.) 17. Respectry the rasp bad_name.txt to 18. Delete the rasp remove_me.txt 19. Return to your residence directory. 20. Begain a seaman rasp comfortable with gzip spectryd development.tgz which comprehends the hw3_files directory. 21. Turn in the development.tgz rasp. At some aim, you may run that you’ve dsingle colossus wickedness, and lack to rouse balance. You’ll lack to gain disencumber of the hw3_files directory, referablewithstanding you may keep inconvenience removing it, due to rasp permissions. Here’s a low-priced habit to gain disencumber of it: mv hw3_files hw3_files.bogus

    Expert Tally

     

    mkdir ~/hw3
    seaman -xvzf hw3.tar.gz -C ~/hw3
    cd ~/hw3
    cp legend.txt save-story
    chmod 0444 save-story
    cat legend.txt | sed ‘s/Alice/Marie Curie/g’ > legend.curie
    grep -v ‘e’ legend.txt | grep ‘und’ > undie.txt
    wc -w < legend.txt >> undie.txt