1. Write a Linux shell script that finds all files on /home that contain a given...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write a Linux shell script that finds all files on /home that contain a given specific text string in the body of the file, and changes the permissions of each such file such that only Alice_<YourFullName> has read and execute permissions. Note that this means no one else (except Alice_<YourFullName> and root) has any other permissions. Additional requirements: As with other assignments, ensure that <YourfullName> is replaced by your actual full name (e.g., this course's TA would use "Isratlui"). • Ensure that the text string your script will search for is supplied at the script's command line. • Note that your script should handle any error conditions by printing out a descriptive error message to the shell and then exiting. • Submit your script with the filename <YourFullName>_restrictfiles.sh. 1. Write a Linux shell script that finds all files on /home that contain a given specific text string in the body of the file, and changes the permissions of each such file such that only Alice_<YourFullName> has read and execute permissions. Note that this means no one else (except Alice_<YourFullName> and root) has any other permissions. Additional requirements: As with other assignments, ensure that <YourfullName> is replaced by your actual full name (e.g., this course's TA would use "Isratlui"). • Ensure that the text string your script will search for is supplied at the script's command line. • Note that your script should handle any error conditions by printing out a descriptive error message to the shell and then exiting. • Submit your script with the filename <YourFullName>_restrictfiles.sh.
Expert Answer:
Answer rating: 100% (QA)
STEP 1 Follow step 2 STEP 2 greprl 1 then echo strim not found exit fi for x ... View the full answer
Related Book For
Excellence in Business Communication
ISBN: 978-0136103769
9th edition
Authors: John V. Thill, Courtland L. Bovee
Posted Date:
Students also viewed these programming questions
-
Use Exhibit 3.3 shown in the body of the chapter to answer the following questions. Required a. Determine the sales volume, fixed cost, and variable cost per unit at the break-even point. b....
-
Use Exhibit 3.3 shown in the body of the chapter to answer the following questions. Required a. Determine the mix of sales volume, fixed cost, and variable cost per unit required to produce a desired...
-
The instructions in the body of the _____________________ statement are always processed at least once during runtime. a. do while b. for c. while d. Both a and b
-
Assume your company shows the market values of equity and debt at the level of $175373 and $224626, respectively. The rate of return on assets is 33 percent and its volatility is 45 percent. The...
-
On January 1, 2011, Fox acquired 70% of the shares (cum div.) of Logan for $141,950. At this date, the equity of Logan consisted of: Share capital .............$100,000 Retained earnings.............
-
A club has 25 members. a) How many ways are there to choose four members of the club to serve on an executive committee? b) How many ways are there to choose a president, vice president, secretary,...
-
You are the global sales manager for Samsung responsible for sales of their tablet computers. The company has just announced a new model that will be available in five countries starting next month...
-
The employees of Donnelly Music Company earn total wages of $4,690 during January. The total amount is taxable under FICA, FUTA, and SUTA. The state contribution rate for the company is 3.6%. The...
-
RH (a) Alternative 1 (b) Alternative 2 Figure 1. Schematic layout of alternative engine construction. Table 1 Specifications of the Whoop-de-do 5000 engine. Engine Specifications Capacity Bore Stroke...
-
Kate Jackson, a new staff accountant, is confused because of the complexities involving accounting standard setting. Specifically, she is confused by the number of bodies issuing financial reporting...
-
3. In population dynamics a frequently encountered model for fish populations is based on an empirical equation called the Ricker equation (see Greenwell, 1984): Nn+1 =aNne-BNn In this equation, a...
-
What is the method of measurement? What controls are in place? What assumptions are used and how are they developed? Has there been a change, or should there be a change, in the methods or...
-
Home Liquidators marks up its merchandise 35% on cost. What is the company's equivalent markup on selling price? Note: Round your answer to the nearest tenth percent
-
The bone in the upper part of the cheek can be fractured by an 899 N force lasting for a minimum of 6.02 x 103 s. In hockey, a training puck with a mass of 280 g can easily provide such a force when...
-
What strategies do you suggest for meeting the major challenges to intercultural communication in your life and profession?
-
Listen Jessica jogged 9km in an hour. She covered the last 4km at a speed that was 2k(m)/(h) slower than her speed in the first 5km. What was her speed over the first 5km ?
-
V. Current ratio QUESTION 3 The following information relate to tow businesses: Polihali (Pty) Ltd M 20 12 20,000 Unit selling price Unit variable cost Fixed costs Contributin ratio Graphics (Pty)...
-
Which one of the following anhydrous chloride is not obtained on direct heating of its hydrated chloride? (A) BaCl2 (B) CaClz (C) MgCl2 (D) SrCl2
-
You work for a midsize freight delivery company that has been using text messaging as the primary communication channel between drivers and the central dispatch office. Drivers send a text message to...
-
Review the reports shown in Figures 12.3 and 12.4. Give specific examples of how each of these reports establishes a good relationship with the audience. Consider such things as using the "you"...
-
Another manager in corporate headquarters stopped by this morning with a request to borrow two of your best employees for a three-week emergency. Under normal conditions, you wouldn't hesitate to...
-
A running mountain lion can make a leap 10.0 m long, reaching a maximum height of 3.0 m. a. What is the speed of the mountain lion just as it leaves the ground? b. At what angle does it leave the...
-
Emily throws a soccer ball out of her dorm window to Allison, who is waiting below to catch it. If Emily throws the ball at an angle of 30 below horizontal with a speed of 12 m/s, how far from the...
-
In punting a football, the kicker tries to maximize both the distance of the kick and its hang timethe time that the ball is in the air. A kicker gets off a great punt with a hang time of 5.0 s that...
Study smarter with the SolutionInn App