summaryrefslogtreecommitdiff
path: root/save.sh
diff options
context:
space:
mode:
authorthomas grothe <thomas@debian>2023-10-31 08:38:30 -0500
committerthomas grothe <thomas@debian>2023-10-31 08:38:30 -0500
commit20ae6cb48ef3ccb80300580b54b7dcc4c7419dc5 (patch)
tree7230ffe473f32265c460c16f4457f6c8c7f47931 /save.sh
parent7ba2f6677e74c86f3e226b5b1f21ff9a26a29b04 (diff)
added security camera scripts
Diffstat (limited to 'save.sh')
-rwxr-xr-xsave.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/save.sh b/save.sh
new file mode 100755
index 0000000..7419c2b
--- /dev/null
+++ b/save.sh
@@ -0,0 +1,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}`
+