How to get a process list if you can’t fork any processes?

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

some usefull commands to transfer files via tar & netcat

I recently needed to transfer some folders from one machine to an other via lan.
I could have used scp or rsync, but the cryptographic layer seems a kind of overhead to me, additonal the two pc’s weren’t the fastest. So netcat came into my mind, and I just wanted to share the commands i used (and keep them for a later use).
So here they are:

Linux version:
Recieve:
netcat -l -p 1234 | pv | tar x
Send:
tar cf - * | pv | netcat [ip] 1234
BSD version:
Recieve:
nc -l 1234 | tar -xpf -
Send:
tar -cf - * | nc [ip] 1234

Frohe Weihnachten

Ich braucht noch schnell eine kleinigkeit zum Feste, da mussten die Leds und der Lötkolben herhalten.

Leuche-Baum

Archiv