summaryrefslogtreecommitdiff
path: root/save.sh
blob: 7419c2b4aec210c61e1a5a69f191448235acaa96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
#security camera companion script
#move recent images into a folder so they aren't deleted

if [[ $1 ]]; then
	n=${1}
else
	n=40
fi

mv `ls -rt *png | tail -n ${n}` save/
chmod a-w save/*png
#chmod a-w `ls -tr *png  | tail -n ${n}`