Ps - list where UID is numeric or name and for current user

Hi,
'ps -ef' returns output of the following format

UID        PID  PPID  C STIME TTY          TIME CMD
root     17573     1  0 Sep12 tty6     00:00:00 /sbin/mingetty tty6
hpsmh    18150 14864  0 Sep12 ?        00:00:00 /opt/hp/hpsmh/sbin/hpsmhd -DSSL -f /opt/hp/hpsmh/conf/smhpd.conf
root     18758     1  0 Sep12 ?        00:03:03 /opt/novell/zenworks/umia/zenumia
20000    18899 30889  0 Oct31 ?        00:00:00 /apps/prog1/tomcat/setenv.sh
sri      154525 45151 0 Oct31 ?        00:00:00 /apps/prog1/apache/setenv.sh

The UID above is numeric if the name is longer than 8 characters, otherwise it's the name itself
Now, what's the command the displays only the processes owned by the current user?
The same command should work for any user and display where UID belongs to him, and it can be numeric or name

Eventually, I am looking for a single line ps command that will display process owned by the current user and kill the PID where CMD contains a string say 'tomcat'

Thanks,
-srinivas y.

ps -fu <userlist>

should work on most systems.

Try:

ps -f -u $LOGNAME

Thanks guys, pgrep/pkill worked too

pgrep -l -U `whoami` -f "java.*tomcat"
pkill -U `whoami` -f "java.*tomcat"