This is an example for those who believe in saving time.
You can create your own aliases to save your time from typing long commands again and again.
Create alias
# alias p_id='echo -n '\''process name:'\'';read a;ps -e | grep firefox | cut -d '\'' '\'' -f 2'
Execute it
# p_id
process name:[name of the running process]
[output will be the process id]
Quick fix:
ReplyDelete[me@myboxen ~]# alias p_id='echo -n '\''process name:'\'';read a;ps -e | grep $a | cut -d '\'' '\'' -f 2'
[me@myboxen ~]# p_id
process name:httpd
6818
6835
6836
6837
6838
6839
6840
6841
6842
But why not just use the pidof command?
[me@myboxen ~]# pidof httpd
6842 6841 6840 6839 6838 6837 6836 6835 6818
I found your post really helpful. Thanks for posting such informative content. Keep posting.
ReplyDeletejoomla extensions