Skip to content

Instantly share code, notes, and snippets.

@loweryaustin
Created April 12, 2020 18:57
Show Gist options
  • Save loweryaustin/02fa146b64d9135357b0cb1bd4ca0d4e to your computer and use it in GitHub Desktop.
Save loweryaustin/02fa146b64d9135357b0cb1bd4ca0d4e to your computer and use it in GitHub Desktop.
cPanel BASH One Liners
## The following one line commands are **NOT** created by or suported by cPanel.
## If you are unsure about how to use these commands, please reach out to a systems administrator to learn how to use them.
## Check the A records of every domain on a cPanel server. This one liner will query both Cloudlfare and Google DNS resolvers and provide the A record for each domain.
for i in $(cut -d : -f 1 /etc/trueuserdomains ) ; do echo ${i}; printf "8.8.8.8 -> A -> "; paste <(dig @8.8.8.8 ${i} A +short) ;echo;printf "1.1.1.1 -> A -> ";paste <(dig @1.1.1.1 ${i} A +short); echo '==========';echo ; done
## I'll try add other one liners later as time allows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment