Last active
August 29, 2015 13:57
-
-
Save igorparrabastias/9491294 to your computer and use it in GitHub Desktop.
Comando chmod -R (recursivo) en directorios y archivos por separado.
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
# Encontrar directorios (-type d) en el directorio actual (.) y darles | |
# acceso 755 | |
find . -type d -exec chmod 755 {} \; | |
# Encontrar archivos (-type f) en el directorio actual (.) y darles | |
# acceso 644 | |
find . -type f -exec chmod 644 {} \; | |
# Encontrar archivos (-type f) html (-name '*.htm*') en el subdirectorio | |
# web (./web) y darles acceso 644 | |
find ./web -type f -name '*.htm*' -exec chmod 644 {} \; | |
# Encontrar archivos/directorios con permiso 777 (-perm 777) en el | |
# directorio actual (.) y darles acceso 755. La opción -print entrega | |
# más información sobre el resultado | |
find . -perm 777 -exec chmod 755 {} \; -print |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment