Linked Questions

7 votes
3 answers
2k views

Let's say I want to know the PID of kate editor that is currently running (kate is just an example, it works as described for many programs). So, I execute ps aux | grep kate. Here is the output: ...
S. N.'s user avatar
  • 317
1 vote
8 answers
3k views

# ps -ef | grep gre root 15067 63614 0 11:03 pts/0 00:00:00 grep --color=auto gre Another example # ps -ef | grep sshd root 1186 1 0 Jul26 ? 00:00:00 /usr/sbin/sshd -D root ...
decodebytes's user avatar
3 votes
1 answer
17k views

If I want to check if something is running, I do ps aux | grep flamethrower, expecting just to show the processes containing flamethrower in the name. This will always find at least one process, as ...
Daedalus Mythos's user avatar
-1 votes
1 answer
4k views

Problem is: grep the output of ps aux for any instance of firefox, if firefox is already running, open link in new tab, if firefox is not running, start firefox and open the link. Point to be noted ...
GypsyCosmonaut's user avatar
0 votes
1 answer
2k views

I am writing a bash script to check if certain application is running or not. If its dead i will simply restart it. My initial though was, check if there is one pid for that process(which in this ...
prayagupadhyay's user avatar
1 vote
1 answer
887 views

I would like to know why ps aux | grep includes the grep command in the output but ps aux | grep "confi[g]" does not. $ ps aux | grep config root 50 0.0 0.0 2548368 5760 ?? Ss ...
c4f4t0r's user avatar
  • 637
1 vote
2 answers
151 views

I am trying to find number of runs of a script but its always 2 even though only one running. sh 11.sh 1 11.sh already running,exiting.. here is code. ps -ef | grep -v grep | grep -c "$0" if [[ `ps ...
dbain's user avatar
  • 77
1 vote
2 answers
207 views

I'd like to redirect output from this command: ps -eo pid,comm,cmd,start,etime | grep -i qtcreator > file.txt When I try it, I've also output command grep -i example 2018 qtcreator ...
Massimiliano's user avatar
0 votes
1 answer
124 views

I would like to have some help writing a script (which should work on FreeBSD where I have sh as default) that should grab a precise string when I do a ps ax | grep bhyve command from the terminal. ...
Marietto's user avatar
  • 599
0 votes
0 answers
94 views

I am trying to write an init.d script, I am trying to kill a named node process: kill $(ps aux | grep 'eproxy' | awk '{print $2}') The problem is, when running just the ps command on it's own, I am ...
JLCarveth's user avatar
0 votes
0 answers
19 views

I would like to have some help writing a script (which should works on freebsd where I have sh as default) that should grab a precise character when I do a "ps ax | grep" command from the ...
Marietto's user avatar
  • 599
290 votes
5 answers
650k views

I have a process originally running in the foreground. I suspended by Ctrl+Z, and then resume its running in the background by bg <jobid>. I wonder how to suspend a process running in the ...
Tim's user avatar
  • 107k
86 votes
15 answers
86k views

Assuming a simple grep such as: $ psa aux | grep someApp 1000 11634 51.2 0.1 32824 9112 pts/1 SN+ 13:24 7:49 someApp This provides much information, but as the first line of the ps ...
dotancohen's user avatar
  • 16.5k
47 votes
3 answers
34k views

Let's say I'm running a script (e.g. in Python). In order to find out how long the program took, one would run time python script1.py Is there a command which keeps track of how much RAM was used as ...
ShanZhengYang's user avatar
14 votes
2 answers
5k views

Why do brackets in a grep pattern remove the grep process from ps results? $ ps -ef | grep XXXX [...] XXXX [...] grep XXXX $ ps -ef | grep [X]XXX [...] XXXX
user avatar

15 30 50 per page