Raspberry PI timelapse

cam.sh

#!/bin/bash

fswebcam --config /home/pi/fswebcam.config

fswebcam.config

device /dev/video0
input 0
skip 20
resolution 640x480
top-banner
log /home/pi/fswebcam.log
jpeg 98
save /home/pi/webcam/capture."%Y%m%d%H%M%S".jpg