Skip to content

Instantly share code, notes, and snippets.

@moriglia
Created October 12, 2020 08:24
Show Gist options
  • Save moriglia/0ab1c459de0b700caa503092de3f11b8 to your computer and use it in GitHub Desktop.
Save moriglia/0ab1c459de0b700caa503092de3f11b8 to your computer and use it in GitHub Desktop.
Get command that has been executed to create the given thread
#!/bin/bash
if [ $# -ne 1 ] ; then
echo "Usage: $0 <pid>";
echo " ";
echo "Get command from pid";
exit -1;
fi
ps -q $1 -o cmd | tail -n 1 ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment