Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Unix shell utillities 3 UNIX Shell Utilities[30 pts] 1. Given sed -n '10,$p' inputlsed '/cat/s/dog/fly/', what does this command do? |3 pts] 2. Print only
Unix shell utillities
3 UNIX Shell Utilities[30 pts] 1. Given sed -n '10,$p' inputlsed '/cat/s/dog/fly/', what does this command do? |3 pts] 2. Print only the 17th line of a given file using head and tail commands. [3 pts] 3. Create a directory under your home directory, and add this directory to your SPATH variable. Verify it by printing the value of SPATH variable, and running an executable placed under this directory from your home directory. Briefly explain why adding this new directory to the SPATH variable is useful. [4 pts] 4. Write a command to display only the files under a directory(But not directories and others). [4 pts 5. Cron is a job scheduling utility provided by Linux/Unix systems, and it allows for periodical execution of predefined commands. Cron jobs are defined using crontab files(You can read more about crontab files here http://www.adminschoice.com/crontab-quick-reference). Write a crontab line that creates an empty file named update.txt under the home directory at 6:32PM of every 7th, 14th, 21st and 28th days of every month. [4 pts 6. i) Create an A4tmp directory in your home directory. ii) Read the man page for the find command. Find out all files (only files) within or below the /var/log directory that have a file size greater than 2000 bytes, while directing all stderr messages to a file called logerror.txt in the A4tmp directory in your home directory. 4 pts 7. i) How many entries with .gz extension are there in the /usr/share/man/manl directory? ii) Within them, how many are not symbolic links? Note that in the output of ls -1, a symbolic link has letter 1 at the start of its line, it also has a "sign in its line. [4 pts 8. i) How many words, lines and characters are there in /usr/share/dict/words respectively? ii) Based on the result in i), how many words are there on each line of the file? iii) Save the words between 100-200 and 400-600 (both inclusive) in this file to files named 100-200.txt and 400-600.txt in your /A4tmp directory, respectively. [4 pts]Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started