file structure how to cd code example Example: terminal find containing directory of file and cd to directory Click to copy$ cd `find ~ -name filename.txt -exec dirname {} \;`