Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jcortell/7d64e306e7dbe5af52e52cfb4062f223 to your computer and use it in GitHub Desktop.
Save jcortell/7d64e306e7dbe5af52e52cfb4062f223 to your computer and use it in GitHub Desktop.
pid=$(pgrep -n duplicity); if [ $pid ]; then fd=$( ps -o cmd --no-headers $pid | sed -E 's/.+(log-fd=[0-9]+).?/\1/' | cut -f2 -d =); if [ $fd ]; then cat /proc/$pid/fd/$fd; else echo "fd not found"; fi else echo "pid not found"; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment