grep "mySearchString" trace.log*
grep -li "lorem ipsum" *
grep -R "mySearchString" <trace.log*> .
Search in all files like <pom.xml> containing "runtime", print the line itself and print 1 line after and 3 lines before
h - print file name n - line number
grep --include="pom.xml" -nRHi "<scope>runtime</scope>" -A1 -B3 *
egrep -r "class.*?{\s+}" --include=*.java .
grep -lR "org.mockito" --include=*Test.java * | xargs grep "org.easymock"
Find all files recursively ending with <*Test.java> and containing "EasyMockSupport" but not "replayAll"
grep -lR "EasyMockSupport" --include=*Test.java * | xargs grep -L "replayAll"
wc -l
sort <file> | uniq -c
find . -type f -size 2c -exec ls {} \;
ls -1 ./ | wc -l
tail -f /opt/tomcat-instances/logs/catalina.out | perl -pe 's/.ERROR./\e[1;31m$&\e[0m/g'
awk -v x=2 '{print $x}' <file>
awk '{$1=$2=""; print $0}' <file>
ls 2>&1 | tee /tmp/ls.txt
find . -name pom.xml | pax -0 -rw /targetFolder
find . -regex ".*war$" -print0 | xargs -0 shasum -b > shasum.original
shasum -c shasum.original
sudo netstat -pltun