To learn how to use a ” Mac OS X. ” perfectly, you must know how to use the terminal, which is the primary command-line shell of the Mac OS X system, comparable to the Windows Command or the homonymous terminal Also present on Linux.
With the Terminal, we can interact with the computer by code, which is exploited essentially before the invention of the Graphic Unit Interface (GUI), that is, of the operating systems with a graphical interface; Even if it’s been a long time in the background, it can still be very useful. In this simple guide, we will learn how to use the base commands of the Terminal on Mac OS X. Caution: This guide is for information purposes only.
- To copy a file, the syntax is: ” cp file .txt filecopy .txt “. This statement creates a copy of the first file and renames it with the specified name after the file itself (obviously, the .txt file must exist in the path we are in). You can also move a file; To do this, we need the mv command. To do this, just type ” mv file .txt path ” where the path indicates the path to the directory where we want to move the file. To delete a file, we will use the rm command, which has the syntax: ” rm filename “. This will delete the specified file if it exists within the current folder.
- Next, we must learn to move between the folders; To do this, we will use the CD command to move from one folder to another. This command is the same in the Windows Command. To move to a folder that naturally has to be contained within the path where we are, just type: ” CD name_of_directory”. If we want to go back to the root directory, just write, ” cd / ” ; If we want to go back to the higher directory than we are in, we have to impart instruction: ” cd .. “.
- You can also run commands that interact with folders. For example, to create a folder and view its content, the syntax to execute is: ” mkdir name_of_directory “. This operation creates a new blank folder, where we can import all the files, we want. The command to use to display the contents of a folder is ls. Now that we know the basics to use the terminal, we can combine multiple commands together to run our Mac for the activities we need and thus be able to use this machine in the best way.