Showing posts with label processes. Show all posts
Showing posts with label processes. Show all posts

Tuesday, October 25, 2011

kill processes that match grep pattern

I open about 20 copies of the same file. I used the command below to kill them.
kill -9 `ps auwwwx | grep "vim /tmp/continuous_migration.log" | awk '{print $2}' | xargs

Wednesday, March 17, 2010

bg, fg, ^Z, ^C

CTRL+Z (or ^Z) - suspend or stopped. To list of jobs and their state by running jobs -l.
CTRL+C (or ^C) - kill the process

bg - background
fg - foreground
jobs -l => lists jobs in background

+ flag on the output of jobs -l indicates the current job and the - flag indicates the previous job.
The %% and %+ names refer to the current job while %- refers to the previous job.

More Info: More Jobs