Is there a command line way to differentiate RPI and RPI2?

Is there a command line way to differentiate RPI and RPI2 from ssh?

cat /proc/cpuinfo would show 4 cores for a 2
also “uname -a” would include armv7l in the output for a 2 whereas the Pi 1’s are armv6

Thanks, both work.