How do I copy the last N lines from a big text file to a separate file in Unix?

tail -n <number of lines> <source> >> <destination>

E.g.:

tail -n 1000 mysql-error.log >> $(date '+%Y-%m-%d-%H-%M').log

unix.stackexchange.com/questions/275848#comment479299_275848