From f7c28dab06ee47d0f28e97ed98cecb400f5aa2cc Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 14 Nov 2021 09:36:24 -0500 Subject: [PATCH] changes accidentally checked into main branch bringing back into dev. and btw, #&**&#&@^#&^@&#^!!!!! --- scripts/core/functions.sh | 2 +- scripts/customize/fred/java_profile.sh | 4 +++ .../{zap_fallout_task.sh => zap_fallout.sh} | 0 .../fred/scripts/games/zap_skyrim.sh | 12 +++++++++ scripts/files/find_newest_files.sh | 26 +++++++++++++++++++ scripts/files/find_oldest_files.sh | 26 +++++++++++++++++++ 6 files changed, 69 insertions(+), 1 deletion(-) rename scripts/customize/fred/scripts/games/{zap_fallout_task.sh => zap_fallout.sh} (100%) create mode 100644 scripts/customize/fred/scripts/games/zap_skyrim.sh create mode 100755 scripts/files/find_newest_files.sh create mode 100755 scripts/files/find_oldest_files.sh diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index c25a8791..c5a4f87d 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -966,7 +966,7 @@ return 0 #hmmm: would the composition of those two types of extensions cover all the files i want to rename? they have to be "important". find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f -and -not -iname ".[a-zA-Z0-9]*" | \ grep -i \ -"csv\|doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|odp\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|xls\|xlsx\|xml\|zip" | \ +"csv\|doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|odp\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|wav\|xls\|xlsx\|xml\|zip" | \ sed -e 's/^/"/' | sed -e 's/$/"/' | \ xargs bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh" # drop the temp file now that we're done. diff --git a/scripts/customize/fred/java_profile.sh b/scripts/customize/fred/java_profile.sh index f98030a6..7c4ce0c9 100644 --- a/scripts/customize/fred/java_profile.sh +++ b/scripts/customize/fred/java_profile.sh @@ -135,6 +135,10 @@ if [ ! -z "$ECLIPSE_DIR" ]; then fi export PATH=$e:$PATH fi +# add in our personal bin path. +if [ -d "/usr/local/fred/bin" ]; then + export PATH=/usr/local/fred/bin:$PATH +fi ############################ diff --git a/scripts/customize/fred/scripts/games/zap_fallout_task.sh b/scripts/customize/fred/scripts/games/zap_fallout.sh similarity index 100% rename from scripts/customize/fred/scripts/games/zap_fallout_task.sh rename to scripts/customize/fred/scripts/games/zap_fallout.sh diff --git a/scripts/customize/fred/scripts/games/zap_skyrim.sh b/scripts/customize/fred/scripts/games/zap_skyrim.sh new file mode 100644 index 00000000..0fec2617 --- /dev/null +++ b/scripts/customize/fred/scripts/games/zap_skyrim.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# windows compatible process killer for any stray processes started as +#"fallout" something. + +source $FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh + +procid="$( psa skyrim | tail -n 1 | awk '{ print $1; }' )" + +if [ ! -z "$procid" ]; then + taskkill.exe /f /pid ${procid} +fi diff --git a/scripts/files/find_newest_files.sh b/scripts/files/find_newest_files.sh new file mode 100755 index 00000000..04a1944c --- /dev/null +++ b/scripts/files/find_newest_files.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# find the most recently updated files in a folder. +# made friendlier for dell by avoiding the .clusterConfig directory and for +# netapp by avoiding the .snapshot directory. + +declare -a paths=("${@}") +echo "paths 1 now is: ${paths[@]}" +if [ ${#paths} -eq 0 ]; then + paths[0]='.' +fi +echo "paths 2 now is: ${paths[@]}" + +for pathname in "${paths[@]}"; do + + echo =============== + echo newest on path: $pathname + echo =============== + echo + + find "$pathname" -path "$pathname/.clusterConfig" -prune -o -path "$pathname/.snapshot" -prune -o -type f -print0 | xargs -0 stat --format '%Y :%y %n' | sort -nr | cut -d: -f2- | head -n 20 + + echo; echo + +done + diff --git a/scripts/files/find_oldest_files.sh b/scripts/files/find_oldest_files.sh new file mode 100755 index 00000000..f50e32cd --- /dev/null +++ b/scripts/files/find_oldest_files.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# find the most antiquated files in a folder. +# made friendlier for dell by avoiding the .clusterConfig directory and for +# netapp by avoiding the .snapshot directory. + +declare -a paths=("${@}") +echo "paths 1 now is: ${paths[@]}" +if [ ${#paths} -eq 0 ]; then + paths[0]='.' +fi +echo "paths 2 now is: ${paths[@]}" + +for pathname in "${paths[@]}"; do + + echo =============== + echo oldest on path: $pathname + echo =============== + echo + + find "$pathname" -path "$pathname/.clusterConfig" -prune -o -path "$pathname/.snapshot" -prune -o -type f -print0 | xargs -0 stat --format '%Y :%y %n' | sort -n | cut -d: -f2- | head -n 20 + + echo; echo + +done + -- 2.34.1