how to get the root directory in a command line arg code example
Example: terminal find containing directory of file and cd to directory
$ cd `find ~ -name filename.txt -exec dirname {} \;`
$ cd `find ~ -name filename.txt -exec dirname {} \;`