Last active
November 1, 2018 13:15
-
-
Save douglascrp/788783aa026aeccb9dfee22642f17e8f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
chattr +i /mountpoint (with the mount unmounted) |
This file contains hidden or 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
du -h -d 1 | sort -rh | head -5 |
This file contains hidden or 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
# Remove arquivos de log com mais de 7 dias | |
find /opt/alfresco/logs/* -maxdepth 0 -name '*.log*' -mtime +7 -type f -exec rm {} \; | |
find /opt/alfresco/logs/bart/* -maxdepth 0 -name '*.log*' -mtime +7 -type f -exec rm {} \; | |
find /opt/alfresco/tomcat/logs/* -maxdepth 0 -name '*.log*' -mtime +7 -type f -exec rm {} \; | |
**Para uma varianção usando o diretório "atual" como parâmetro para o find:** | |
cd /opt/alfresco/logs | |
find `pwd`/* -maxdepth 0 -name '*.log*' -mtime +7 -type f -exec rm {} \; | |
cd /opt/alfresco/logs/bart | |
find `pwd`/* -maxdepth 0 -name '*.log*' -mtime +7 -type f -exec rm {} \; | |
cd /opt/alfresco/tomcat/logs | |
find `pwd`/* -maxdepth 0 -name '*.log*' -mtime +7 -type f -exec rm {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment