Skip to content

Instantly share code, notes, and snippets.

@centminmod
Created October 12, 2017 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save centminmod/5dea240a89be29968239752b3eaa7802 to your computer and use it in GitHub Desktop.
Save centminmod/5dea240a89be29968239752b3eaa7802 to your computer and use it in GitHub Desktop.
check .htaccess contents in /home

list .htaccess files in /home

find /home -name ".htaccess" | while read h; do echo $h; done

list .htaccess files in /home + save contents of each .htaccess include path name at top of files in /home/all-htaccess directory for inspection

mkdir -p /home/all-htaccess
find /home -name ".htaccess" | while read h; do echo $h; echo -e "$h\n" > /home/all-htaccess/htaccess-contents-$(date +"%d%m%y-%H%M%S").txt; cat $h >> /home/all-htaccess/htaccess-contents-$(date +"%d%m%y-%H%M%S").txt; sleep 1; done
ls -lahrt /home/all-htaccess
cd /home/all-htaccess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment