Posted on 2024-03-01 (Last modified on 2024-04-25) fileName="my-file.yaml" find . -type f -name "$fileName" -printf "%h\n" bash scripting See also Cleanup After Script Exit Find files and folders with spaces Managing Multiple Kube Config Files Working With Dates in Bash and Other Shells Navigate to Script Directory