Raspberry PI 2 Serial Connectoin
Raspberry PI 2 Serial Connectoin

To find the text define and USE_UART with unknown stuff in between

grep -r "define.*USE_UART" * 
To find a file. Name of file can have a wildcard in it. Use iname so case doesn't matter

find -name name_of_file
find / -iname '*abc*'

To search in ubuntu for a package
apt-cache search search_term

To set the time as root
date nnddhhmm[[cc]yy][.ss]
date 102308442015.00

To set time when ntp protocol is blocked
$curl --head http://google.com 2>&1 | grep "^Date:" | sed "s/^Date: //" | xargs -0 date -s

To get the version of a raspberry pi
cat /etc/debian_version
cat /etc/os-release
8.0 is Jessie

Get ipaddress
hostname -I
remote copy a directory (rsmb) and its sub directories to a remote host
user@LinuxBox:/buildroot/openwrt$ scp -r package/rsmb/ garry@10.38.228.11:/buildroot/openwrt/package/

follow the tail end of a file
user@LinuxBox:/buildroot/openwrt$ tail -f /var/log/messages

remote copy a file from a windows box with putty install to a raspberry pi
C:\Users\Admin>pscp -2 puttygen.pub pi@rpi-gts1.local:/home/pi
puttygen.pub | 0 kB | 0.5 kB/s | ETA: 00:00:00 | 100%


remote copy a file from a raspberry pi named piDaq to a windows PC.
C:\repos\GTS-Dev-ATE-App-Mophie>pscp -pw Welcome1 pi@piDaq.local:/home/pi/daq_serial.py C:\temp\piDaqHome\
daq_serial.py | 1 kB | 1.5 kB/s | ETA: 00:00:00 | 100%

Keys for auto login to raspberry pi

Links to websites explaining how to set up raspberry pi with keys and use putty to login automatically
ozzmaker.com explains keygen and putty settings
raspi.tv explains the directory stuture and permissions on the raspberry
phcomp.co.uk explains Passwordless Login in genera
And some general information about keys on a server
Checking ssh public key fingerprints
NOTE! be careful when you copy the public key to the raspberry pi.
If you use puttygen to create the keys and save the public key to a file and copy that file to the raspberry pi it will not work.
Copy the key direct from putty gen window to get the correct format of the key.