Question
PART F 1- Create a long running process by typing ping 127.0.0.1. Suspend it with CTRL+Z. How would you bring it to the foreground? and
PART F
1- Create a long running process by typing ping 127.0.0.1. Suspend it with CTRL+Z.
How would you bring it to the foreground? and how would you Terminate it?
2- Create a long running process in the background by typing ping 127.0.0.1
>/dev/null&. Find out its process id using ps and kill it using kill.
3- Sometimes ps aux truncates the process name. How can you get ps to display the full
process name and its arguments?
4- What does the command kill -9 pid do, where pid is the number of a process? Are
there other options than -9 that might be useful? What does kill -9 -1 do?
PART G
1- What do the following commands do?
(a) ls | grep i doc
(b) command2>&1 | grep i fail
(c) command2>&1 >/dev/null | grep i fail
2- Write composite commands to perform the following tasks:
(a) Output a recursive listing (using ls) of your home directory, including invisible
files, to the file /tmp/HOMEFILES.
(b) Find any files (using find) on the system that are world-writable. Error
messages should be discarded (redirected to /dev/null).
(c) Find all files in /etcthat contain either the string 10.17.1 or the string
130.236.189 and output their names to /tmp/FILES. Any error messages
should be discarded. For this exercise you may want to use egrepand a
regexp containing the infix operator |.
(d) Output a recursive listing (using ls) of your home directory, including invisible
files, to the file /tmp/HOMEFILES and to the screen. You may find the tee
command useful here.
3- Output the contents of the first file found in /etcthat contains the string 10.17.1 or the string 130.236.189. You can combine find, grep, head, xargsand cat to get
the job done. Read the man pages for the commands you arent familiar with.
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