Skip to content

Instantly share code, notes, and snippets.

@asmattic
Last active March 31, 2020 18:26
Show Gist options
  • Save asmattic/0123ae30aa72930e223fad956e10306a to your computer and use it in GitHub Desktop.
Save asmattic/0123ae30aa72930e223fad956e10306a to your computer and use it in GitHub Desktop.
Check Ubuntu backup progress
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