Friends, below is a discussion of the format of the command that is included in the basic commands LINUX operating system. Ok, we see a direct friend-format format like.
Complete formatting commands in LINUX Operating Systems shaped:nama_perintah [options] [args ...]Description:• Brackets elbow state that is in it is optional. Could exist, could not exist.• Signs point three times (...) states that the components in front of this sign can be repeated several times.• nama_perintah can be built-in commands or programs (utilities, shell scripts and applications). Stating that the command will be executed by the shell.• options (option) to change or add to the default action of the command.• argument stating the object to be processed by the command. This section is generally in the form of files. But it can also contain data that will be processed.For example, the command has the following format:
Complete formatting commands in LINUX Operating Systems shaped:nama_perintah [options] [args ...]Description:• Brackets elbow state that is in it is optional. Could exist, could not exist.• Signs point three times (...) states that the components in front of this sign can be repeated several times.• nama_perintah can be built-in commands or programs (utilities, shell scripts and applications). Stating that the command will be executed by the shell.• options (option) to change or add to the default action of the command.• argument stating the object to be processed by the command. This section is generally in the form of files. But it can also contain data that will be processed.For example, the command has the following format:
wc [-WC1] file ...That is one form of the following commands were introduced:wc-w file1wc-w-file1 file2wc file1 file2wc-WC1 file1If you type in a command and you end anyby pressing <Enter>, the line you type is calledas a command line (command line). Examples of some of the command line,involving either option, or the argument does not involve choices,argument or not it involves two components.1. Ls2. Ls -13. Ls -1/etc/passwd4. Ls -1/etc/passwd/etc/groupIn the first instance, there is no argument or choice. The second example involves a choice. A third example involves the selection or argument. The last example involves the selection and two arguments. At the time of typing a command, inter part in a command line must be separated by one or several characters:• spaces• tabThese characters can be called white spaces (whitespaces). Asexample, to write the command:ls -1 / etc / passwdThe following writings will give the same result.<space> <space> ls -1 / etc / passwd<tab> <space> ls -1 / etc / passwd<space> <tab> ls -1 / etc / passwd<tab> <tab> ls -1 / etc / passwdEach row of a character that is not white space is called the word (word). So:<space> ls -1 / etc / passwdconsists of the wordOptions (Options)An option is part of the command line, in the form of a word that begins with a minus sign (-), which controls the action of a command. For example, ls is a utility that is used to display the contents of a directory. The ls command can not contain options or arguments. The result of the file names in the working directory (the default action). To change the default action of ls, -1 option (displays file information such as file size and file owner) can be added.# Lsblank blank passwd# _# Ls -1total 4-Rw-r - r - 1 andi alpha 0 January 20 21:30 blank-Rw-r - r - 1 andi alpha 0 January 20 21:30 empty-Rw-r - r - 1 andi alpha 1429 January 20 21:30 passwd# _Sometimes the choices that need to be given to a command not onlya. For example, the ls-r option there that will showlist of files by name in reverse order (descending).# Ls-rpasswd blank blank# _If desired to fuse opsion-r and -1, we cangive the following command:# Ls -1-rtotal 4-Rw-r - r - 1 andi alpha 0 January 20 21:30 passwd-Rw-r - r - 1 andi alpha 0 January 20 21:30 empty-Rw-r - r - 1 andi alpha blank 1429 January 20 21:30# _In addition to using the above method, -1 and-r option can be combinedbe a word. Thus writing:ls-1rls-r1equivalent to ls -1-r. Order of preference are combined such thatcan be inverted.Note: although generally an option begins with the character -, theresome commands that use the + character to initiate the option.The example in the Korn shell and Bourne Again shell:Set +0 viIn this example a resident +0 as an option.ArgumentArguments have another term in the form of parameters. The argument is part of the command line used to provide information - the data, files, and so on - which will be subject to action by the command. In contrast to the option, the argument does not have a special mark that will be used to start it. To see the effect of argument, ls can be used. As in the example in front, ls -1 displays information files (names and attributes). But if you give a command such as:ls -1/etc/passwdthen the file is processed only the / etc / passwd.# -1 / Etc / passwd-Rw-r - r - 1 root root 1428 January 20 21:30 / etc / passwd# _
No comments:
Post a Comment