While working on terminal, we can quickly get the full path of any finder item on terminal. This is really useful in several cases, for example, when we are renaming & moving a file using mv command, we need to provide the full path of the original folder. By just dragging a folder into terminal we can get the full path on terminal.
Steps are as follows:
- Open Terminal. To open press
Command –Space , type terminal and hit enter. - Open Finder window and locate the file/folder for which you need the full path. Drag the file/folder to the terminal. This will copy the full path of that file/folder on terminal as shown in the screenshot below.
Dragging the file into the terminal:
Full path on terminal: