|
INTERVIEW QUESTIONS
OPERATING SYSTEMS
SHELL SCRIPTING
DETAILS
Question: For class I need to create the command line. cAN ANYONE HELP ME?
Using the commands ps, cut, tr and kill, along with pipes, write a command that will find all sleep processes running on the system and kill them.
Thank you Archie
Answer: sleep process means it's a process name or else
if process name is sleep
ps -ef|grep sleep|tr -s " "|cut -d " " -f1|kill -9
|
|
|
Category |
Shell Scripting Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 7808 users |
Added on |
5/18/2013 |
Views |
67017 |
Rate it! |
|
|
Question:
For class I need to create the command line. cAN ANYONE HELP ME?
Using the commands ps, cut, tr and kill, along with pipes, write a command that will find all sleep processes running on the system and kill them.
Thank you Archie
Answer:
sleep process means it's a process name or else
if process name is sleep
ps -ef|grep sleep|tr -s " "|cut -d " " -f1|kill -9 Source: CoolInterview.com
Answered by: pritish | Date: 8/26/2008
| Contact pritish
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What does $? return?
|
View Answer
|
|
How would you replace the n character in a file with some xyz?
|
View Answer
|
|
How would you print just the 25th line in a file (smallest possible script please)?
|
View Answer
|
|
How would you get the character positions 10-20 from a text file?
|
View Answer
|
|
When you login to a c shell, which script would be run first? (before the terminal is ready for the user)
|
View Answer
|
|
How do you read arguments in a shell program - $1, $2 ...
|
View Answer
|
|
What are the different kinds of loops available in shell script
|
View Answer
|
|
How do u open a read only file in Unix?
|
View Answer
|
|
How do you schedule a command to run at 4:00 every morning?
|
View Answer
|
|
How will you list only the empty lines in a file (using grep)
|
View Answer
|
|
What is the difference between a shell variable that is exported and the one that is not exported?
|
View Answer
|
|
What is the difference between a shell variable that is exported and the one that is not exported?
|
View Answer
|
|
If you have a string "one two three", which shell command would you use to extract the strings
|
View Answer
|
|
What is $*
|
View Answer
|
|
What does $# stand for?
|
View Answer
|
|
Different types of shells
|
View Answer
|
|
What is MUTEX?
|
View Answer
|
|
What is the difference between a 'thread' and a 'process'?
|
View Answer
|
|
What is INODE?
|
View Answer
|
|
Explain the working of Virtual Memory.
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Shell Scripting Interview Questions & Answers - Exam Mode /
Learning Mode
|