bash tricks

Sep, 22, 2024

bash tricks

Show zombie process and them parents

ps -eo pid=,ppid=,stat=,etime=,cmd= | awk '$3 ~ /Z/ {
  printf "ZOMBIE: pid=%s ppid=%s stat=%s etime=%s cmd=%s\n", $1,$2,$3,$4,substr($0,index($0,$5));
  system("ps -o pid=,ppid=,stat=,etime=,cmd= -p " $2 " | sed \"s/^/  PARENT: /\"");
  print "";
}'

Get conncened wifi password and qr to connect

nmcli device wifi show-password'
bash tricks | Aleksandr Suprun