codeaprendiz.github.io

DevOps Essentials

View on GitHub

find

NAME

find – walk a file hierarchy

SYNOPSIS

find [-H -L -P] [-EXdsx] [-f path] path … [expression]
find [-H -L -P] [-EXdsx] -f path [path …] [expression]

DESCRIPTION

GNU find searches the directory tree rooted at each given starting-point by evaluating the given expression from left to right, according to the rules of precedence, until the outcome is known (the left hand side is false for and operations, true for or), at which point find moves on to the next file name.
If no starting point is specified, `.’ is assumed.

OPTIONS

EXAMPLES

find /app/endeca/PlatformServices/workspace/logs -mtime +25 -exec ls -ltr {} \;
find $HOME/.BUILD_SCRIPTS_AREA/  -mmin -180 -name "*-bld.lock"|grep "$BLD_LOCK"|wc -l
[username@hostname admin-scripts]$ find $HOME -size +100M|grep "/logs/" 
/username/domains/test.prd.webDomain/servers/test/logs/test.out00006 
-bash-3.2$ find . -xdev -type f -size +100M -exec du -sh {} + 
374M    ./apache-tomcat-7.0.34/logs/catalina.out 
113M    ./sonar/sonarqube-5.5.zip 
107M    ./tmp-02082016/.jenkins/plugins.zip