Bash snippets Get size of files of current directory with mask du -c `find . -maxdepth 1 -name '*.php'` | tail -1 Count lines in files with mask find . -maxdepth 1 -name '*.php' -print | xargs wc -l Exclude path from search by find find ./ -name '*.*' -not -path "./pathname/*" Rename files by mask, add extension to files rename 's/(.*)/$1.jpg/' * Recursively output list of files with extensions ls -1 -- **/+(*.jpg|*.gif|*.png) Use find with multiple extensions Method 1 find . -type f \( -name "*.shtml" -or -name "*.css" \) Method 2 find -type f -regex ".*/.*\.\(shtml\|css\)" C++ calls graph clang++ -S -emit-llvm main.cpp -o - | opt -analyze -dot-callgraph dot -Tpng -ocallgraph.png callgraph.dot