Menu

Run metatrader on linux basic commands

3 Comments

This chapter tells you how to run the basic commands that you need in order to use Debian Linux. We assume that you have already logged in and are in a shell where you can enter commands. If you are not running X-Windows, you will normally be put in an interactive shell as soon as you log in. If you are running X-Windows, you should refer to X Windows, Chapter 17 for instructions on how to start up a window with a shell. The linux shells are described in Shells, Chapter 5. Bash is the default shell when Debian Linux is first installed. To run a command, type the command commands the prompt, followed by any necessary options, and then press the Enter key. The shell will interpret the command, first handling any special shell syntax, and will then start the command as a new process. Most commands operate silently unless they are specifically asked to say what they are doing. If there is no error message, the command should have worked. When you type in a command name, Linux has to find the file which contains the program you want to run. This is how it does it:. The first word of what you type in is the command[ 3 ] itself. The file indicated by that path is used, provided that it exists, that it is executable and in the case of a script that it is readable. If the command does not contain a slash, the shell searches for it in your current search path. This is a list of directories, separated one from another by colons. The command search path is held in the environment variable PATH: Each directory is searched in turn, starting at the beginning of the list. If a match for the name is found, the shell also considers whether the file found is executable and readable, if it is a script. As soon as such a match run found, the search stops[ 4 ]. This is why new programmers often have trouble getting their first program to run. They frequently call it test and run it without a path; the shell finds the system program test first and runs that instead. If you need to change your path, you should add the new directories to the end of the list; the current directory. The operation of most basic can be changed by putting command options immediately after the command name. There are several styles of options used, and you have to check the documentation for each command to know what options it can take, and what they do. A few commands have options which need not be preceded by a hyphen. The one you are most likely to use is tar. A third option style, commonly used by GNU programs, is whole words or phrases introduced by Many commands can use both the single-letter and whole-word options:. We give only a brief description of the command, describing its basic use. For full details, you should always refer to the detailed documentation of the manual pages and the info files. The brief examples given here are not by any means the only way of doing things; the key to using Unix is to learn the building blocks and their capabilities and become able to use them in your own way. Whatever the task, there is almost always more than one way to carry it out. Sometimes there will be five or six different ways! In this chapter, things which are optional are shown like this. Words looking like this are to be replaced by whatever is appropriate to what you are trying to do. More details are given in Documentation, Chapter 3. A lot of Debian Linux documentation is provided in info format. This is similar to a hypertext format, in that you can jump to other metatrader of the documentation by following links embedded in the text. See Documentation, Chapter 3 for a full description of how to use info. A fuller description of file-systems and file-handling is given in Files and File Systems, Chapter 4. Change your current directory to the named directory. If you don't specify directoryyou will be returned to your home directory. Again, target can be a directory and source a list of files. With the -r option it can delete directories and their linux. Be very careful with rm ; once a file is deleted, you cannot get it back. There is no undelete command. Use the -R option to do this for an entire directory tree. There are more options to ls than to any other command. Those most commonly used are -lto show the file permissions and the run change date and -ato show hidden dot-files. Files are organised into file-systems see Files and File Systems, Chapter 4. Files are placed under directories, which may themselves be placed in directories, and so on. These are simply directories which are nominated to be the head of the new tree. It is also the command to use to add a partition's file-system into the universal directory tree. You have to be superuser log in as root or run su in order to mount or unmount file-systems. Files include physical devices, executable programs and directories, as well as text files. It is as well not to look at compiled run on the screen however. At best they will be garbage; at worst they will make everything on the screen unreadable see Managing your screen, Section 6. If you name more than one file, each will be sent in order, with no break or heading. Press Space-bar to move on one page, Enter to move on one line, and b to move back one page. Use q or ctrl-c to quit. You have to type Q to terminate it. With no options, it displays the file contents as a series of octal numbers. Since few people are fluent with this form, the -c and the -x options together are probably more useful. They display the file contents as real characters where possible and as octal numbers if the characters are not displayable, with, underneath, the hexadecimal representation. The numbers in the left hand column are always octal; they indicate the byte offset of the first commands on the line from the beginning of the file. You can use dd to copy a file while dropping its first few bytes, to break a file into chunks, to copy a disk image onto a floppy for instance to get a Debian boot floppyto inspect the contents of a tape, or anything else that your ingenuity can suggest. This command has many other useful options. It breaks long lists of files given to a command into chunks that are short enough for the shell to handle. In this way, you can run through the entire file system and execute some command on all the selected files. For example, this command looks for all files in your home directory that have been changed within the last two days, and sets group write access on them all:. When you have sat helpless for a while trying to work out why your entire display contains total garbage, or why pressing an arrow key puts irrelevant characters up, you may well feel that it's time to tip the whole computer system into the dustbin and go back to the abacus. This section offers you a lifeline. First of all, here are some commands to handle what you can see on your screen. The screen can be either the whole text display or a single text window in X. All VDUs attached on serial cables, and all memory-mapped displays that emulate VDUs, including your text console basic your xterm windows, respond to special character sequences that will change the appearance of run whole screen, or portions of it, when they are commands to the screen. Usually, these sequences start with the ESCAPE character, but they don't have to. Because of the vast number of different VDUs produced by many different manufacturers, mostly with different control sequences, Linux has a database of the sequences that apply to different types of VDU. The database appears in two forms -- the older is called termcap and the newer, terminfo. The clear sequence blanks the screen and puts the cursor in the top left hand corner. If, intentionally or not, you display a binary file on the screen, you may chance to send to the screen the sequence that makes it display its alternative character set; this usually contains a lot of graphics line-drawing characters, card suits, odd mathematical symbols and so on. The computer's attempt to display ordinary text in this character set produces a screen containing basic garbage. The rmacs sequence switches the display out of the alternate character set. Use this command to stop the display showing garbage graphics characters and make it show proper text instead. The effect is usually to change new characters sent to be proper text, but leave text already displayed as it is. It controls characteristics such as the baud-rate, parity, number of stop-bits and handshaking, all basic which should be set up for you by your system administrator if that is you, commands the System Administration manual. In the case of your console, or of an xterm window, which are mapped directly from memory, the line characteristics are irrelevant, but there are certain characteristics set by stty which are relevant to every kind of display. These are some characteristics could be used by you if it seemed necessary. If it is necessary, you may find that nothing at all seems to work; this may be because the return key no longer works and Linux has reverted to using the basic default, which is new line Ctrl-J. If nothing at all seems to work, press Ctrl-J before entering any command and finish your commands with Ctrl-J instead of return. Remember to use Ctrl-J both before and after the command and don't use the return key. In order to save space on your disks, many files are compressed. They are scanned by a program such as gzip or compress and reduced in size, often to about one third of their original size. Zdeletes it and writes an uncompressed file called file. In spite of its name, gunzip cannot handle zip format files created by PKZIP. There is a pkunzip program that can handle such files. You need to do regular backups, in order to be able to recover your system and data in case of disaster. In order to get full access to all the files that need to be backed up, system backups must be done by the superuser. This section refers only to backups of your own home directory and of other files to which linux have access. It has many options, but here is a simple example of using it to create a backup of your home directory to a SCSI tape:. A list of files is prepared in some way and then piped into the standard input of cpio. This is how to use it to archive your home directory to SCSI tape:. It has the additional capability of compressing files before it writes them on the backup. This is useful if you have a lot of information to store on media of limited capacity. This is how to use it to archive your home directory to SCSI tape, using compression:. The jobs metatrader continue to print, even if you log out. If you have more than one printer, you can use the option -P printer to direct a job to one particular printer. If a job is already printing, this may not stop it; the job may already be stored in the printer's memory. When you first log in, you will see a prompt, which may contain your current machine's hostname, and perhaps the current directory. The prompt ends with a dollar sign: If you become superuser, the dollar sign should change to a hash or sharp sign: You need to know that you are superuser, because you can then do a great deal basic damage to your system by mistyping ordinary commands. Use exit or logout to terminate your session and log out. All jobs you have started are terminated, unless they were started with nohupand your screen should return you to the log-in prompt. You can often use Ctrl-D to do the same, but that capability can be disabled. Use su to become superuser. You will be asked to enter a password; this is the password for the root login. Becoming superuser is almost the same as logging in as root. You get the same power to do damage. If you are running one job and want to run something else in the same screen linux stopping the first job, you can put the first job in the background by typing Ctrl-Z. You can then run other commands. You can start the first job running again in the background run using bg. It will continue to run linux the background until it wants to send anything to the screen; then it will stop and wait. You can bring it forward again and let it continue by using the command fg. Use script to record everything that appears on the screen until the next exit in file. This is useful if you need to record what's going on in order to include it in your message when you ask for help. Use exit, logout or ctrl-D to stop the recording session. The number in the column headed PID is the identifying number of the process. Under column TT is the tty screen or window commands where it is running. A question mark here means that it is not attached to any screen or window, but is running in the background. Use passwd to change the password that you use when you log in. Follow the instructions on screen about what kind of password to choose. When you type the password in, it doesn't show on the screen, so you have to enter it twice, to ensure that you make no typing errors. Turning the computer on and off is really a system administration subject, but I include it here because it is something that every user who is his own administrator needs to know. If someone else is responsible for administering the metatrader, you should neither need nor be able to shut it down. This command shuts the computer down safely. You can also use ctrl-alt-del if your system is set up for that. If you are in X, ctrl-alt-del will be basic by X. Get out of X first by using ctrl-alt-backspace. Never turn metatrader a Unix machine without doing a safe shutdown: When you type a command, certain characters have a special meaning to the shell and are interpreted before the command starts to run. Full details are given in the chapter on shells, but you need to understand what is happening, or you will get results that you did not expect. Shell metatrader characters are interpreted by the shell as soon as it is given the command. The ls command never sees the asterisk. So if you want to search for files which actually have an run in their names, you have to escape the asterisk to stop the shell from interpreting it. In the example, the first command matched all files; the second matched only those with a literal asterisk at the end of their names. See Shells, Chapter 5. The contents of the backquotes are run as a command and basic output is metatrader as part of this command. The vertical bar sign is used to indicate a pipe. The command linux the left-hand side of the pipe sends its output to the input of metatrader command on the right linux of the pipe. The double ampersand is used between two commands on the same line. It tells the shell to run the second command only if the first one was successful[ 8 ]. The double vertical bar is used between two commands on commands same line. It tells the shell to run the second command only if the first one was unsuccessful. These characters have a special meaning only if they are the first non-space character in the command:. For more details see Shells, Chapter 5. Don't confuse shell special characters with special characters in regular expressions see Regular expressions, Section 6. Regular run must be protected from the shell by enclosing them in single quotes. This is a fundamental concept of all Unix and Unix-like systems. Many commands are designed to be filters. They can therefore be used as building blocks to make more complex commands, in whatever way is needed at the time. When the shell starts a command for you, it opens files for standard input, standard output and standard error. By default, standard input is your keyboard, standard output is your screen, and standard error is also your screen. Although the defaults are keyboard and screen, this can easily be changed. In fact, the shell copies its own standard input, output and error when it starts a command, so the command inherits whatever the shell has. A command can change its own settings, by opening a run file, and you can tell the shell to use a file instead of the default of keyboard or screen. The file descriptor numbers for standard input, standard output and standard error are 0, 1 and 2 respectively. This means that errors can be directed separately from normal output. We have already seen that cat can be used to look at files. In conjunction with redirection of standard output, it can be used to write files as well. If you omit filelistcat will take its input linux the keyboard, until you type ctrl-D. It is commonly used basic script programs to put text on the screen. Redirection is a simple part of shell programming, for which see the manual pages of bash, zsh, tcsh, or whatever shell you have chosen. A shell program is a set of commands in a file or typed in. Once you have stored a shell program in a program file, you have to make it executable by running chmod:. Unix commands normally execute silently unless asked to be verbose or unless there is an error. An error means something that does not make sense to Linux; it doesn't mean something you don't want to happen! Regular expressions are a way of specifying some text to match without having to spell it out exactly. Regular expressions are used inside editors and in the grep command. They are not the same as the limited file pattern matching that is done by the command line. A regular expression can be very simple or very complicated. Complicated expressions are built up by joining together simple ones. In this section we are only dealing with simple uses of regular expressions in the grep and zgrep commands. The simplest expressions are called atoms, because they cannot be broken down any further. A list of characters in square brackets matches any single character provided that it occurs inside the brackets. A range commands characters commands be expressed inside the brackets by specifying the two ends of the range separated by a minus sign. This means that any character matches except those in the brackets. A circumflex character outside square brackets indicates the beginning of a line. So it can only have this meaning at the beginning of a regular expression. A dollar character outside square brackets indicates the end of a line. So it can only have this meaning at the end of a regular expression. A backslash escapes the character that follows it; that is, it alters that character's meaning. Some letters have special meanings if they follow a backslash: A regular expression followed by an asterisk is matched by 0 or more occurrences of that regular expression. A regular expression followed by a plus sign is matched by 1 or more occurrences of that regular expression. A regular expression followed by a question mark is matched by 0 or one occurrences of that regular expression. The plus sign is escaped with a metatrader to make it have its special meaning. The whole regular expression is in single quotes to protect it from being evaluated by the shell.

Linux Command Line Tutorial For Beginners 1 - Introduction

Linux Command Line Tutorial For Beginners 1 - Introduction

3 thoughts on “Run metatrader on linux basic commands”

  1. AMart says:

    Now a nude, still life, street scene, family celebration can be critiqued with generally no introduction.

  2. adcontext.net says:

    That may be something that can be clarified in the future, even if this report overlooked it.

  3. Andorro says:

    If the online presence of your business is important to you, as it should be, then trust in the strength of our number.

Leave a Reply

Your email address will not be published. Required fields are marked *

inserted by FC2 system