process list | Tag | ohneKontur - der Blog https://www.ohnekontur.de ohne Linien und Kanten und trotzdem gefangen Fri, 28 Nov 2014 09:53:25 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.5 How to get a process list if you can’t fork any processes? https://www.ohnekontur.de/2013/01/05/how-to-get-a-process-list-if-you-cant-fork-any-processes/ https://www.ohnekontur.de/2013/01/05/how-to-get-a-process-list-if-you-cant-fork-any-processes/#respond Sat, 05 Jan 2013 09:29:19 +0000 http://www.ohnekontur.de/?p=2214 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 … Continue reading

The post How to get a process list if you can’t fork any processes? first appeared on ohneKontur - der Blog.]]>
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
The post How to get a process list if you can’t fork any processes? first appeared on ohneKontur - der Blog.]]>
https://www.ohnekontur.de/2013/01/05/how-to-get-a-process-list-if-you-cant-fork-any-processes/feed/ 0