$ ping6 -c1 -M do -s 10000 www.google.com | grep mtu | awk '{ print $NF }'
mtu=1500
So the IPv6 MTU to www.google.com is 1500.
From another system, the MTU is 1480:
$ ping6 -c1 -M do -s 10000 www.google.com | grep mtu | awk '{ print $NF }'
mtu=1480
Easy, isn't it?
For old-skool IPv4, the output of ping is a bit different, so the awk parsing is a bit different:
$ ping -c1 -M do -s 10000 www.google.com | grep mtu | awk '{ print $NF }' | sed -e s/\)//
1500
HTH