COP3353_HW04

docx

School

Florida State University *

*We aren’t endorsed by this school

Course

3353

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

3

Uploaded by ProfKangarooMaster3806

Report
COP3353 – Introduction to Unix Spring 2024 Homework 4 Due Sunday Night, February 11, 2024 ►Briona Loughran Questions: Lab 1 – Patch Question 1 Apply the Patch in the instructions : What did the patch add to the original file? It added “Abraham Lincoln” and “1863” onto the bottom of the file Questions: Lab 2 - Grep Question 2 – Using only grep , what is the command to display the lines of jw containing the word stood Grep stood jw Question 3 – What piped commands do the same as above, but using cat piped to grep . (This is sometimes called “Useless use of cat” but it’s the way the Unix creators intended). Cat jw | grep stood Question 4 – Use man grep to find how to select only the lines containing matches that form whole words . List all the lines in Jabberwocky that contain the word ' in '. (Tip: Use the search feature in the man page – man uses less to display text, and less uses / as the hot-key for searching). Write only the command here: Grep -w in jw
Questions: Lab 3 – File Permissions Run ls -l /home/faculty/lockwood/.plan (This is in your instructor’s directory) Question 5 – Is this a file or a directory? It’s a file Question 6 – Look at the file permissions for /home/faculty/lockwood/.plan a. Who among our colleagues can read or write it? b. What are the file permission shown by ls -l ? c. What are the octal (numeric) file permissions shown by stat ? a. CS faculty b. -rw-r--r-- c. 0644 Question 7 – Can you see the contents of /home/faculty/lockwood/.plan using less or cat ? Yes, it said Computer Science Distance Program Panama City Florida Campus The finger command tells you about other users' accounts on the host. - If you enter finger by itself, it tells about the users currently logged into the host. - If you enter finger followed by a user name, it tells a few details about that user. Run the command finger lockwood Note what’s displayed at the end of the output. The finger command running in your session fills in the Plan section by printing my .plan file to your screen. Question 8 – Would finger be able to print one user’s .plan file to another user’s session if the file’s owner removed permission for everyone to read it? No finger would not be able to print out another users plan if everyone didn’t have permission to see it
--Tip-- This command gives everyone read permission to your own .plan file, but gives only you write permission : chmod 0644 .plan
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help