Recently I got the question what to do if one got a bash session but can’t fork processes on a Linux system.
So here is an attempt to get a processlist just by using bash buildins:
OLDPWD=$PWD cd /proc for x in [0-9]* do read cmd < /proc/${x}/comm read cmdl < /proc/${x}/cmdline printf "%8s - %15s - %s" $x $cmd $cmdl echo done cd $OLDPWD |