Mac-Terminal Some Basics

Mac-Terminal some basics
Terminal some basics
The "Terminal" is an application (located in the "Utilities" folder in "Applications") that can communicate with the computer through a command line (text interface). The UNIX commands are not, however, a priori, made for everyone ... If you decide to try their luck and enter command lines in your "Terminal", be careful what you write and READ BACK especially your order before confirming !! A mistake could lead to disaster.

A do we really need to use the "Terminal"?
OFF: For most users, this will prove unnecessary. Many small applications (eg "Onyx") are responsible to perform operations on your behalf, so that's reassuring.

YES: For some operations you may be required to go through your "Terminal." In this case, carefully follow the advice and instructions of these operations ... You'll see that when you clear things up, it goes smoothly!

In this section, I'll just tell you a number of orders, without going into too much detail. (I would willingly ignore the notions of "absolute path" and "relative path", contenting myself to indicate orders "absolute path"). These commands are among the most common and, although you have little chance to use them one day, better still know! No?

Send a command usually involves writing a funny formula on a line of "Terminal" and then press the "Enter" key to see it run. Get information about the system, the hardware used on the hierarchy of folders, their contents, including invisible files, the permissions for each item, for example, but also change the permissions, delete or move a file or folder, concatenate files, open, view and edit the contents of files even if they are invisible, compress files, connect to the Internet, download files from the Internet and so on, represent a small part of many operations that may be made directly on the "Terminal" and without opening a single other application. Everything begins by sending a single command.

Still, for the vast majority of MacUsers, the "Terminal" will almost never used ... Since you will use the simplest method: simply open the applications! And that's good as well!

Some commands "Terminal"
To know a bit what the "Terminal" and UNIX commands, you can perform here without too much worry. Enter the following commands in your "Terminal”.... Just to know a little about that damn "Terminal"!

ls : The list of files and folders installed in your user folder appears.
ls -a : The list of ALL user folder items, including invisible items appear.
ls -a Documents : The list of ALL the elements of the "Documents" folder appears (you can substitute "Documents" by another folder name.
ls -l : Give more detail than the ls command: Appear permissions, owner, group, etc ...
Man: This tells you what a given control of the terminal is. For example, type man ls : This will tell you what is ls
pwd (Print Working Directory) This command displays the absolute path to the directory where you are. This will allow you to locate you at any time in the OS tree X.
cd (Change Directory) To change the directory. For example, to visit the Marc directory, you would type cd / Users / Marc
PC: Use this to copy a file: For example, to copy the file User / Marc / documents / text.doc in the "important" directory, it will type the command: cp /Users/Marc/Documents/texte.doc Users / Marc /Documents/Important/texte.doc
MV: Used to move a file from one directory to another. (Same as for copying a file)
rm : Used to delete a file. For example: rm text.doc
rmdir : Use to permanently delete an empty folder. For example: rmdirtartampion
top: Allows you to view the current process. To exit typing "q".
df -h : Displays the list of mounted volumes on your Mac and the characteristics of these (very handy).
chown : To change the owner of a file.
mkdir To create a directory.

As you can see, this type of control is far from interesting to ordinary MacUsers we are. To copy, move or delete a file do not find that there are simpler methods and can be faster? The "Terminal" will be especially useful for certain well-specialist users.

The command list above is not exhaustive of course.... There are dozens of UNIX commands, which you can find in specialized books or the Internet. For fans of the genre!
Previous
Next Post »