Another option, if you already have terminal open, is to drag the file/folder from Finder into your terminal window. The path will be pasted there.