That opens up the specific file using the predefined program. Open -a 'Microsoft Word' ~/Documents/SoP_Prajith_New.docx So for opening the DOCX file in the Documents folder of my Mac, I typed in the command below and then hit Enter: For that, you need to type out the command with some requirements - the path of the respective file: Then you can type the following command and then hit Enter.Īnd that opens my Documents folder. Let's say you want to open your Documents folder. However, using Terminal, you can open a specific folder or a file without exposing your file structure to anyone.
I know that clicking on Finder will do the same. One of the coolest ways to get familiar with the Terminal is to use it to open files and folders. Otherwise partial commands will not work as intended. Note: While selecting/copying a command, make sure you scroll all the way towards right to select the complete command in the gray box.