Created
July 29, 2014 19:12
-
-
Save lucasff/646e3ea332cf29304c30 to your computer and use it in GitHub Desktop.
Shell common commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Salvar galeria sem as fotos (somente o código-fonte) | |
# Remove "empty" files | |
for i in `find /home/*/public_html/* -type f -name 'empty'`; do rm -f $i; done | |
# Remove error_logs | |
for i in `find /home/*/public_html/* -type f -name 'error_log'`; do rm -f $i; done | |
# Permissions fix | |
find . -type f -exec chmod 644 {} \; | |
find . -type d -exec chmod 755 {} \; | |
find /home/*/public_html -type d -exec chmod 755 {} \; | |
find /home/*/public_html -type f -exec chmod 644 {} \; | |
for i in `find /home/*/public_html/* -type f`; do chmod 644 $i; done | |
for i in `find /home/*/public_html/* -type d`; do chmod 755 $i; done | |
chmod 755 /home/*/public_html/cgi-bin/ -R | |
for i in `ls /var/cpanel/users` ; do chown -R $i.$i /home/$i/public_html/* ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment