Find
Looking for largest directories in MB (include pattern, excluding another, and looking for info into a file within the directory)
find '/var/opt/gitlab/git-data/repositories/@hashed/' -name '*.git' -not -path '*.wiki.git' -exec sh -c 'du -s -BM $1 | cut -f1 | sed 's/M//' | tr -d "\n"; grep fullpath "$1/config" | cut -d= -f2' sh {} \; | sort -n -r | head -n 10
Type directory
find ... -type d ...
Print basename only
find ... -printf '%f\n'
Tips
Use partial information from return
E.g. here we remove the extension thanks to bash
find . -name "*.mp4" -exec sh -c 'ffmpeg -i "$1" -c:a libmp3lame "${1%.*}.mp3"' sh {} \;