Skip to main content

How to Open files in Mac directly from terminal?

Well, Guys Today we will be learning on how to open files in Mac directly from terminal?

First of all,

Open terminal.

Use cmd + space to open spotlight and type terminal and hit enter.

Opening Terminal Using spotlight















Now, that you have opened it , you will see something like this
Terminal















Now, type open.
In this tutorial i will try to open name.cpp from desktop
Terminal- using command open




In my MBP, it launches Xcode to open the file name.cpp. Xcode is the default application to open .cpp files.
However, if you want to open it in a different application like I have a text editor named atom and i want to open it in atom so i will hit a command like this
Terminal- using command open -a "<application-name>" filename




So, in short the command to open application is like this,

open -a "application-name" filename
and then hit enter.

Don't forget to like and comment. And post any doubts or corrections.
Video of How to's like this are in progress. In a month you will be able to watch these helpful How to's. Thank you. Don't forget to share ;).


Comments

Popular posts from this blog

Quadratic Equations

A Quadratic Equation is an polynomial equation with highest degree 2. For e.g.: 5x 2  + 2=0 2x 2  + x + 1=0 General form of the equation is: ax 2  + bx + cx = 0 where a is not equal to 0 Normal form of Quadratic equation can also be represented by two parameters. (say m and n) x 2  + mx + n = 0 Normally , We are asked to find the roots  of the equation. The roots of the equation can be  found using three methods. Let us take the example x 2 -6x + 8=0 and solve this equation using these methods separately. Let's Start: 1.) The Grouping Method or that's what i call it    In this method we try to split the middle term or 'b' such that it is equal to the product of the rest of the terms or 'ac'. Now, let us apply this method on the above equation. x 2  -6x + 8=0 As, it is easily visible, the term -6 has to be split in a such a way that it's product equals to 8. x 2  -6x + 8=0...

Quadratic Equations: Made Easier for JEE

Quadratic Equation lesson 2 In the previous lesson we learned on how to solve an equation. We found three methods to solve the equation. If not visit  http://scipsycho.blogspot.in/2016/08/quadratic-equations.html Now, we will go into details about quadratic equation, the importance of parameter a, b and c and other things that are important for JEE aspirants. Let's begin. As we saw earlier, a quadratic equation can be represented by  ax 2  + bx +c =0.  Let's start with 'a'. 1.) Coefficient of x 2  Case 1. : when a < 0 let's inspect the graphical form of the equation. If x -> ∞, only the  x 2   term will decide the outcome of the expression as it's magnitude will overwhelm the other factors. Now, as  x -> ∞ the value of expression will tend to infinity if a>0. However, a is less than zero therefore, the expression will tend to  -∞. when x -> - ∞,  x 2  -> ∞, and thus even then the expres...

How to change Default OS using Boot Camp on Mac Book Pro?

Hello guys. Today we will be talking about how to change Default OS using Boot Camp on Macbook Pro. This method also works if you having any other booting device. If you want to install windows on Macbook Pro using Boot Camp first, follow this link. http://scipsycho.blogspot.in/2016/09/how-to-install-windows-using-bootcamp.html So, let's start, Step 1: Open System Preferences Hit Enter, Step 2: Click Startup Disk Icon below in the fourth row. Step 4: Click the lock to make changes and enter the password of     .       your account. Step 5: Select the OS you want to make Default. Also, if you want to boot now, click Restart.. If you selected Mac OS X it will look something like this Now, Exit . You have successfully made the OS X as the default OS. Thank you for reading. Keep coming for more. Don't forget to share and comment. Videos are in progress. ...