[LINUX] Grep so that grep does not appear at the time of grep

When extracting a process that contains an arbitrary character string when checking the process

ps aux | grep target


mochimochi 18277  248  1.4 1122692 367144 ?      Sl   21:18   0:39 ./target_process
mochimochi 18294  231  1.5 1253764 373160 ?      Sl   21:18   0:34 ./target_process
root     18565  0.0  0.0 112828   972 pts/0    S+   21:19   0:00 grep --color=auto target

It is a subtle obstacle that the command hitting myself is also listed So use the v option (exclusion)

ps aux | grep target | grep -v grep

Specify grep as a grep exclusion target while including the target character string

mochimochi 18277  248  1.4 1122692 367144 ?      Sl   21:18   0:39 ./target_process
mochimochi 18294  231  1.5 1253764 373160 ?      Sl   21:18   0:34 ./target_process

Recommended Posts

Grep so that grep does not appear at the time of grep
When incrementing the value of a key that does not exist
The story of the release work of the application that Google does not tell
At the time of python update on ubuntu
About the matter that softmax is not needed at the end of Torchvision model.
One liner that randomly rewrites the startup time of cron
Decorator that displays "FIN method name" at the end of the method
[Python] Tensorflow 2.0 did not support Python 3.8, so the story of downgrading Python
distutils log does not appear
A decorator that notifies you via AWS-SNS if the function does not finish within the specified time
The result of analyzing Kant's "criticism of judgment" that I did not read at all was interesting
The story that the version of python 3.7.7 was not adapted to Heroku
You should not use the --color = always option of the grep command
Explaining the mechanism of Linux that you do not know unexpectedly
Investigate the top 10 stocks raised at the time of the first state of emergency
A function that measures the processing time of a method in python
The problem that the version of Vue CLI did not go up
Problem that discord.py does not break
Process the result of% time,% timeit
I started to work at different times, so I made a bot that tells me the time to leave
Count the number of times two values appear in a Python 3 iterator type element at the same time
[Zabbix] Does the response time of Web monitoring include image files, etc.?
The module that should have been installed with pip does not run
Processing when the key input of Python pygame does not go well.
A note about the functions of the Linux standard library that handles time
Get a datetime instance at any time of the day in Python
Set up a server that processes multiple connections at the same time
This and that of the inclusion notation.
Shout Hello, Reiwa! At the beginning of Reiwa
Call the python debugger at any time
Python> Python does not include the last offset
Python Basic Course (at the end of 15)
The update of conda is not finished.
There is no telnet! At that time
Example of what to do when the sample script does not work (OpenCV-Python)
It seems that the version of pyflakes is not the latest when flake8 is installed
[Python] The movement of the decorator that can be understood this time ② The decorator that receives the argument
The story of IPv6 address that I want to keep at a minimum
A decorator that does something if the function doesn't finish within the specified time
33 selections that the soshage engineer emphasizes during code review [added at any time]
Set the color on the poster side so that the color of the Youtube subtitles changes automatically.
With LINEBot, I made an app that informs me of the "bus time"
Solution to the problem that build does not end when installing OpenCV (PEP517)
Make sure to align the pre-processing at the time of forecast model creation and forecast
[Verification] Does levelDB take time to register data when the amount of data increases? ??
Type conversion of multiple columns of pandas DataFrame with astype at the same time
What to do when the graph does not appear in jupyter (ipython) notebook
Examples and solutions that the Python version specified in pyenv does not run
A program that sends a fixed amount of mail at a specified time by Python
Deep Learning! The story of the data itself that is read when it does not follow after handwritten number recognition