Community Page
- www.tech-recipes.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- it wont work help me
- it dosnt bring up the flash player wizard can u help please
- Google is the best search engine...what else I can say? But I dont use google chrome, I prefer other browser
- Thank you so much i haven't had to do that on vista and nearly two years and have used a seperate quick launce bar for many many years and it was driving me insane
- Lovely! I completely forgot about dos2unix and sincerely I like to use vim better if I can :)
4 years ago
thanks for posting this great help jproctor
4 years ago
In the most basic usage, grep will search through text looking for the search string. If you want to look for commands containing the string 'http' you would simply use:
..... | grep http | ....Grep stands for global regular expression parser and is a magnificently powerful tool. The important thing to take out of that mouthful is 'regular expression' which is a formal language for representing elaborate wildcards for searching. For example, a period matches any single character, so .at would match bat, cat, rat, and so on. Used in a grep statement, it would match that regular expression anywhere in the line, so it would also match brat and bats. Regular expressions would be a great idea for a series of rec.pes.
4 years ago
4 years ago
always try a kill (without -9) first
2 years ago
kill -9 `ps -ef | grep <process-name> | grep -v grep | awk '{print $2}'`
Just make sure that you keyin the correct process name in the above command.
2 years ago
thanks for posting this great help jproctor</ul>
you can use pgrep and pkill
2 years ago
PID TTY COMMAND
2345 ? 0:00 msgcntl //
4977 pts/tc 0:00 ps
3807 ? 0:00 spectrum
3813 ? 0:00 msgcntl //
3802 ? 0:00 printmgr
3814 ? 0:00 ssmcntl//
3810 ? 0:00 ptrcntl//
3815 ? 0:00 ssmcntl//
3811 ? 0:00 termcntl//
3817 ? 0:00 ssmcntl//
3816 ? 0:00 pccntl//
3798 ? 0:00 rsetcntl//
2215 pts/tc 0:00 sh
<font color="blue">In the above scenario, I have to kill all the process except ps and sh . How to do that ?</font>
2 years ago
egrep -v "ps|sh|PID" file | awk '{print $1}' | xargs kill