Possible duplicate of ["Find current directory and file's directory"](https://stackoverflow.com/questions/5137497/find-current-directory-and-files-directory)
– Nov 25 '17 at 16:41
1
Possible duplicate of [Find current directory and file's directory](https://stackoverflow.com/questions/5137497/find-current-directory-and-files-directory)
– kluttNov 25 '17 at 16:42
2
`dirname` doesn't even look at the file system; it is purely a string operation on a file path that (roughly) drops the part after the last `/`.
– chepnerNov 25 '17 at 16:45