From a24e87eb5df257887924bd690796ce1f7fdab025 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Tue, 12 Feb 2013 15:26:13 -0500 Subject: [PATCH] fixed inconsistent naming on change_endings, tossed out old script for finding bad protection on files, fixed up recursive renlower paths. --- .../{change_endings.pl => change_suffix.pl} | 0 scripts/files/find_bad_protection.sh | 54 ------------------- scripts/files/recursive_renlower.sh | 2 +- 3 files changed, 1 insertion(+), 55 deletions(-) rename scripts/files/{change_endings.pl => change_suffix.pl} (100%) delete mode 100644 scripts/files/find_bad_protection.sh diff --git a/scripts/files/change_endings.pl b/scripts/files/change_suffix.pl similarity index 100% rename from scripts/files/change_endings.pl rename to scripts/files/change_suffix.pl diff --git a/scripts/files/find_bad_protection.sh b/scripts/files/find_bad_protection.sh deleted file mode 100644 index b9add8fc..00000000 --- a/scripts/files/find_bad_protection.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" - -bad_file="$HOME/bad_protections.txt" -if [ $# = 0 ]; then dirname=$HOME; export dirname; -else dirname=$1; export dirname; fi - -echo "Searching for bad file protections in $dirname..." -echo "This includes any files that are writable by other or that have the" -echo "SetUID or SetGID bits turned on." - -echo "Bad file modes and owners report for $(date_stringer)." >$bad_file -echo "" >>$bad_file - -export outfile="$(mktemp "$TMP/zz_badprot.XXXXXX")" - -echo "These files have bad modes:" >>$bad_file -find "$dirname" -type f -exec ls -AlF {} ';' >$outfile -cat $outfile | - sed -n -e '/^.....w/p - /^........w/p - /^..s.../p - /^.....s/p' | - grep '^[^l]' >>$bad_file -rm $outfile -echo "" >>$bad_file - -echo "These directories have bad modes:" >>$bad_file -find "$dirname" -type d -exec ls -Ald {} ';' >$outfile - -#this is same as above block. make it a function. -cat $outfile | - sed -n -e '/^.....w/p - /^........w/p - /^..s.../p - /^.....s/p' | - grep '^[^l]' >>$bad_file -rm $outfile -# - -echo "Searching for Files Not Owned by the User in $HOME...." -echo "" >>$bad_file -bash $FEISTY_MEOW_SCRIPTS/find_non_owned.sh $HOME >>$bad_file - -echo "" >>$bad_file -echo "" >>$bad_file - -echo $(basename $0) " is finished. Showing report from $bad_file" - -less $bad_file - -#optional: rm $bad_file - diff --git a/scripts/files/recursive_renlower.sh b/scripts/files/recursive_renlower.sh index 4d3f68de..b4ea3c79 100644 --- a/scripts/files/recursive_renlower.sh +++ b/scripts/files/recursive_renlower.sh @@ -2,6 +2,6 @@ #need to support multiple names. for i; do #old find "$1" -type d -depth -print -exec perl $FEISTY_MEOW_SCRIPTS/renlower.pl {}/* ';' - find "$i" -depth -exec perl $FEISTY_MEOW_SCRIPTS/renlower.pl "{}" ';' + find "$i" -depth -exec perl $FEISTY_MEOW_SCRIPTS/files/renlower.pl "{}" ';' done -- 2.34.1