Posts Tagged With: ps

PS Command Forest Mode

Tagged with: , , , , ,

Displays linux tasks in a hierarchical mode


ps -e -o pid,args --forest
1 Comment »

Pid Command

Tagged with: , , , , , , ,

Create a command that will return the pid of the given command string..


#!/bin/sh
ps aux|grep $1|head -n1|awk '{print $2}'
No Comments »

Better Way to find Process ID of an Application in Linux

Tagged with: , , , , , , ,

A better way to get the process id of an application. I recommend giving an alias for this command…


ps aux|grep firefox|awk '{print $2 "\t\t" $12}'|head -n1

Replace firefox with the name of the application you are searching for.

[tags]linux,command,cli,awk,ps,process,id,grep[/tags]

No Comments »