new script to find the latest files in a folder
authorChris Koeritz <fred@gruntose.com>
Fri, 5 Nov 2021 23:55:09 +0000 (19:55 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 5 Nov 2021 23:55:09 +0000 (19:55 -0400)
also a customized script for fred for backing up his onedrive folder.
some better docs too.

scripts/customize/fred/scripts/jobby/onedrive_backerer.sh [new file with mode: 0644]
scripts/files/find_latest_files.sh [new file with mode: 0755]
scripts/security/show_all_cert_chains.sh

diff --git a/scripts/customize/fred/scripts/jobby/onedrive_backerer.sh b/scripts/customize/fred/scripts/jobby/onedrive_backerer.sh
new file mode 100644 (file)
index 0000000..1adfa9b
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# backs up the uva onedrive folder (which itself is fed from the cloud).
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+pushd ~/data
+exit_on_error changing to data folder.
+
+zip -r ~/onedrive_backup_uva_$(date_stringer).zip onedrive-uva-live -x \*.ova -x \*.webarchive 
+exit_on_error zipping up the uva onedrive folder.
+
+
+popd
+
+
diff --git a/scripts/files/find_latest_files.sh b/scripts/files/find_latest_files.sh
new file mode 100755 (executable)
index 0000000..2795961
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# find last written files, made friendly for dell by avoiding the .clusterConfig directory.
+
+for pathname in "${@}"; do
+
+  echo ==============
+  echo latest on path: $pathname
+  echo
+  find "$pathname" -path "$pathname/.clusterConfig" -prune -o -type f -print0 | xargs -0 stat --format '%Y :%y %n' | sort -nr | cut -d: -f2- | head -n 20
+
+  echo; echo
+
+done
+
index 1fe4125b13691c05b0935fa137ca6aa8725cfdeb..f36415a0eeb7ff2d75cfba83552aec7776c2587f 100644 (file)
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+# displays every certificate in a PEM file that has a whole certificate chain.
+# this is surprisingly annoying to get anything to output, so we codified it.
+
+# by chris koeritz
+
 file="$1"; shift
 if [ -z "$file" -o ! -f "$file" ]; then
   echo This script requires a PEM-format file name to show the certificates within.