How to make screenshot from command line

platform-edc $ screencapture -i ~/Desktop/$(date +%Y%m%d%H%M%S).png
libpng warning: zero length keyword
libpng warning: Empty language field in iTXt chunk
 
platform-edc $ screencapture  ~/Desktop/A$(date +%Y%m%d%H%M%S).png
libpng warning: zero length keyword
libpng warning: Empty language field in iTXt chunk

First one is “interactive” - Cmd-Shift-3 with selection tool, second is full screen