The current command interpreter. User guide. Command line

This section describes commands and symbols that have special meanings that allow you to:

  • - find using a template and manipulate groups of files;
  • - run the command in the background or at a specific time;
  • - execute a group of commands sequentially;
  • - redirect standard input and output;
  • - terminate running programs.

The SHELL interpreter is a shell for the entire operating system and performs interface functions between the user and the OS. It intercepts and interprets all user commands, generates and displays response messages.

In addition to running standard UNIX commands and executable files, the interpreter includes its own language, which in its capabilities is close to high-level programming languages. This language allows you to create programs (shell files, scripts) that can include language operators and UNIX commands. Such files do not require compilation and are executed in interpreted mode, but they must have executable permission (set using the command chmod).

The user communicates with the command interpreter by entering commands from the keyboard after the appearance of a prompt (invitation), usually the "$" symbol. The interpreter will consider the entered sequence of characters either as the name of an internal command or as the name of an executable file.

The shell procedure (script) can be passed arguments when launched. Each of the first nine arguments is assigned a positional parameter from $1 to $9 ($0 is the name of the procedure itself), and by these names they can be accessed from the text of the procedure.

Before we look at some shell statements, we should pay attention to the use of certain symbols in commands.

Below are the metacharacters used shell:

* ? - allow you to specify abbreviated file names when searching by pattern;

& - means that the command will be executed in the background;

; - separates commands on the command line;

Overrides the special meaning of characters such as *, ?, [, ], &, ;,<,

"..." - cancels the value of space as a delimiter and special value

all characters;

"..." - cancels the value of space as a separator and the special meaning of all characters except $ and;

> - redirects the command output to a file;

< - redirects command input from a file;

>> - redirects command output that should be added to

end of existing file;

| - creates a pipe that directs the output of one command to the input of another

`...` - used in pairs; allows you to use the command output as

command line arguments;

$ - used with positional parameters and user-defined

variable namer, also used by default in

as a hint shell.

In addition, for the convenience of working with files, almost all command interpreters interpret the "?" characters. and "*", using them as file name patterns (so-called metacharacters):

  • ? - any one symbol;
  • * - arbitrary number of any characters.

For example: *.c - specifies all files with the extension "c";

pr???.* - specifies files whose names begin with "pr", contain five characters and have any extension.

Shell variables

The shell language allows you to work with variables (without prior declaration). Variable names begin with a letter and can include letters and numbers. Access to variables begins with the "$" sign.

Example. Going to the user's home directory: cd $HOME

Assignment operator. Assigning values ​​to variables is done using the `=" operator without spaces.

In Linux there is no separate object called "system". A system is a system because it consists of numerous components that interact with each other. The main system component is the user. It is he who commands the machine, and it carries out his commands. The tutorials in sections two and three cover system calls (kernel functions) and library functions. They are the direct commands to the system. True, you can use them only by writing a program (most often in the C language), often a rather complex program. The fact is that kernel functions implement low-level operations, and to solve even the simplest user task, it is necessary to perform several such operations, converting the result of one to the needs of another. There is a need to invent for the user another - higher-level and more convenient to use - system control language. All the commands that Methodius used in his work were part of this particular language.

From which it was easy to conclude that some special program must also process these commands and turn them into a sequence of system and library calls, and it is with this program that the user continuously dialogues immediately after logging into the system. And so it turned out: this program is called command line interpreter or command shell(“shell”). It is called a “shell” precisely because all control of the system occurs as if “from within” it: the user communicates with it in a language convenient for them (using a text command line), and it communicates with other parts of the system in a language convenient for them (by calling programmed functions).

Thus, the command line parsing rules mentioned above are rules that operate specifically in the command interpreter: the user enters a line from the terminal, the shell reads it, sometimes converts it according to certain rules, splits the resulting line into a command and parameters, and then executes the command, passing her these parameters. The command, in turn, analyzes the parameters, selects the keys among them, and does what was asked, simultaneously displaying data for the user on the terminal, after which it completes. Upon completion of the command, the work of the “retreating into the background” command interpreter resumes, it again reads the command line, parses it, calls the command... This continues until the user commands the shell to terminate itself (using logout or the control character “^ D", which for the shell means the same as for other programs: there will be no more input from the terminal).

Of course, there are several command interpreters in Linux. The simplest of these, which appeared in early versions of UNIX, was called sh, or "Bourne Shell" - after the name of its author, Stephen Bourne. Over time, it was - wherever possible - replaced by a more powerful one, bash, "Bourne Again Shell".

A play on words: “Bourne Again” is read aloud as “born again,” i.e., “reborn.”

bash is superior to sh in every way, especially its command line editing capabilities. In addition to sh and bash, the system can have “The Z Shell”, zsh, the most powerful command interpreter to date (no joke, 22 thousand lines of documentation), or tcsh, an updated and also very powerful version of the old “C Shell” shell, whose command syntax is similar to the C programming language.

When Gurevich added Methodius's account to the system, he did not ask what command interpreter he needed, because he knew: for a beginner, the name of the command interpreter is an empty phrase. However, the name of the shell that is launched for the user immediately after logging in is the so-called. starting command interpreter(login shell) is a part of the user account that the user can change with the chsh (change shell) command.

Whatever system management task a Linux user faces, it must have a solution in terms of the command interpreter. In fact, solving a user problem is describing it in the shell language. The language of communication between the user and the command interpreter is a high-level programming language, complemented, on the one hand, by means of organizing the interaction of commands and the system, and on the other hand, by means of interaction with the user, making it easier and faster to work with the command line.

Illustration 2. Command line interface. Second edition, revised and expanded. User interaction with the computer through the terminal and shell.

Commands and utilities

$ apropos s . . . (four and a half thousand lines!)

Example 18. Pointless command

One unsuccessful launch of apropos was enough for Methodius to understand: there are a lot of commands in Linux. It occurred to him that no program - even a shell - could independently understand all the documented commands. In addition, Gurevich named most of the teams utilities, that is, useful programs. Therefore, the command interpreter does not have to be able to execute everything that the user enters. All he needs to do is parse the command line, extract the command and parameters from it, and then run the utility - a program whose name matches the name of the command.

In reality, there are few native commands in the shell. Basically, these are programming language operators and other means of controlling the interpreter itself. All commands familiar to Methodius, even echo, exist in Linux as separate utilities. The shell is only concerned with preparing a set of parameters on the command line (for example, expanding templates), runs programs and processes the results of their work.

$ type info info is /usr/bin/info $ type echo echo is a shell builtin $ type -a echo echo is a shell builtin echo is /bin/echo $ type -a -t echo builtin file $ type -a -t date file $type -at cat file

Example 19. Defining the command type

In bash, the type of a command can be determined using the type command. Bash's native commands are called builtin(built-in command), and for utilities it displays path, containing the name of the directory in which the file with the corresponding program is located, and the name of this program. Some of the most useful commands are built into bash, even though they are available as utilities (e.g. echo). The built-in command works the same way, but since it takes significantly less time to execute, the command interpreter will choose it if possible. Switch "-a" (" a ll", of course), causes type to print all possible interpretations of the command, and the -t switch causes the type of the command to be printed instead of the path.

On Gurevich's advice, Methodius grouped the keys by writing "-at" instead of "-a -t". Many utilities allow you to do this, reducing the length of the command line. If a parametric key is encountered, it must be the last one in the group, and its value must follow, as expected. Only single-letter keys can be grouped.

Words and separators

When parsing the command line, the shell uses the concept delimiter(delimiter). A delimiter is a character that separates words; so the command line is the sequence words(which matter) and separators(which don't matter). For the shell, the delimiters are the space character, the tab character, and the newline character (which can still appear between words in the manner described in the lectures Working with Text Data and Command Shell Features). The number of separators between two adjacent words does not matter.

The first word in the triple is passed to the command as the first parameter, the second - as the second, etc. In order for the separator to be inside the word (and the resulting string with the separator to be passed as one parameter), the entire required substring must be surrounded with single or double quotes:

$ echo One Two Three One Two Three $ echo One "Two Three" One Two Three $ echo "One > > Oh. And what next? > Oh, I forgot the quotes!" One Oh. So, what is next? Oh, I forgot the quotes! $

Example 20. Quoting on the command line

In the first case, the echo command was passed three parameters - “One”, “Two” and “Three”. She brought them out, separating them with a space. In the second case, there were two parameters: “One” and “Two Three”. As a result, these two parameters were also output separated by a space. In the third case, there was only one parameter - from the opening apostrophe ““One” to the closing “...forgot!” " All the time he was typing, bash helpfully gave Methodius the hint “>” - as a sign that typing the command line continued, but in the mode of entering the contents of quotation marks.

On most Linux operating systems, bash is the default command line interpreter. To determine the current interpreter, enter the following command:

$ echo $SHELL
/bin/bash

This example usescommand line interpreter bash. There are many other command interpreters. To activate another interpreter, you can enter its name at the command line (ksh, tcsh, csh, sh, bash, etc.).

Most full-featured Linux operating systems provide all the command interpreters described here. But on smaller operating systems one or two interpreters may be provided.

Checking the availability of the item you are interested ininterpretercommand line

The easiest way to check the availability of the command interpreter of interest is to enter its name on the command line. If the interpreter has started, it is available.

There are several reasons for choosing alternative shells.

  • Experience working on UNIX System V systems (many of which use ksh by default) or Sun Microsystems and other Berkeley UNIX systems (which often use csh). In this case, the use of these interpreterscommand linewill be more convenient.
  • The need to run scripts that were created for a specific command interpreter.
  • The capabilities of an alternative shell may be preferable. For example, one member of the Linux user group prefers to use ksh because he is unhappy with the way bash creates aliases.

Although most users prefer to work in one shell, the skills gained help them learn to work in others.interpreters command line , occasionally looking at the reference manual (for example, using the manbash command). Most people use bash because there is no reason to switch to another interpreter.

Using Bash and ch

The name bash is an acronym for Bourne Again SHell. This abbreviation indicates that bash inherits the Bourneshell interpreter (sh command), created by Steve Bourne of AT&TBell Labs. Brian Fox of the Free Software Foundation created bash as part of the GNU Project. Subsequently, development passed into the hands of Chet Ramey at Case Western Reserve University.

The bash interpreter contains features that were developed for the sh and ksh interpreters in early versions of UNIX, as well as a number of features of the csh interpreter.

You can expect that on most Linux systems, except for specialized ones (for example, those that are embedded or booted from an external drive), the bash interpreter is used by default. In specialized systems, a smaller command interpreter may be required, which also implies limited capabilities.

Most of the examples in thisarticledesigned for bash use.

The bash interpreter can run in various compatibility modes, simulating the behavior of other shells. It can mimic the behavior of the Bourne shell (sh) or a POSK standards-compliant shell (bash -posix).

As a result, bash is more likely to be able to successfully read configuration files and run scripts written specifically for other shells.

All provided Linux operating systems use the bash interpreter by default, except for operating systems booted from removable media, which use the ash interpreter by default.

Using tcsh (and the earlier csh interpreter)

The tcsh command interpreter is an open source implementation of the Cshell (csh) interpreter. The csh interpreter was created by Bill Joy and is used by default on almost all Berkeley UNIX systems (such systems were distributed by Sun Microsystems).

Many of csh's features, such as command line editing and command history management methods, have been implemented in tcsh and other shells. Just as the sh command runs the bash interpreter in sh-compatible mode, the csh command runs the tcsh interpreter in csh-compatible mode.

Using the ash interpreter

The ash interpreter is a lightweight version of the Berkeley UNIX sh interpreter. It does not contain many basic features and does not provide features such as command history.

The ash interpreter is well suited for use in embedded systems with limited system resources. On the FedoraCore 4 operating system, the ash interpreter is an order of magnitude smaller than the bash interpreter.

Using zsh

The zsh interpreter is another clone of the sh interpreter. It is POSIX compliant (like bash), but has other features, including spell checking and a different approach to command line editing. The zsh interpreter was the default interpreter on early MacOS X operating systems, but modern systems use the bash interpreter by default.

By default, batch file commands are displayed on the screen before execution, which does not look very aesthetically pleasing. Using the ECHO OFF command, you can disable duplication of commands coming after it (the ECHO OFF command itself is still duplicated). For example,

REM The next two commands will be duplicated on the screen... DIR C:\ ECHO OFF REM And the rest will no longer be DIR D:\

To restore duplication mode, use the ECHO ON command. In addition, you can disable duplication of any individual line in the batch file by writing the @ symbol at the beginning of this line, for example:

ECHO ON REM The DIR C:\ command is duplicated on the DIR C:\ REM screen, but the DIR D:\ command is not @DIR D:\

Thus, if you put the command at the very beginning of the file

@ECHO OFF

then this will solve all problems with duplication of commands.

In a batch file, you can display message lines on the screen. This is done using the command

ECHO message

For example,

@ECHO OFF ​ECHO Hello!

ECHO Team. (the period must immediately follow the word "ECHO") displays a blank line.

It is often convenient to view messages output from a batch file by first clearing the screen completely with the CLS command.

Using the I/O redirection mechanism (the > and >> symbols), you can direct messages output by the ECHO command to a specific text file. For example:

@ECHO OFF ECHO Hello! > hi.txt ECHO Bye! >>hi.txt

Using this method, you can, say, fill out protocol files with a report on the actions taken. For example:

@ECHO OFF REM Attempt to copy XCOPY C:\PROGRAMS D:\PROGRAMS /s REM Adding a message to the report.txt file if REM completed the copy successfully IF NOT ERRORLEVEL 1 ECHO Successful copy >> report.txt

Using command line options

When running batch files on the command line, you can specify an arbitrary number of parameters, the values ​​of which can be used inside the file. This allows, for example, the same batch file to be used to execute commands with different parameters.

To access command line parameters from a batch file, use the characters %0, %1, ..., %9, or %*. In this case, instead of %0, the name of the executable batch file is substituted, instead of %1, %2, ..., %9 - the values ​​of the first nine command line parameters, respectively, and instead of %* - all arguments. If fewer than nine parameters are specified on the command line when calling a batch file, then the “extra” variables from %1 – %9 are replaced with empty lines. Consider the following example. Let there be a command file copy.bat with the following content:

@ECHO OFF CLS ECHO File %0 copies directory %1 to %2 XCOPY %1 %2 /S

If you run it from the command line with two parameters, for example

Copier.bat C:\Programs D:\Backup

then a message will be displayed on the screen

The copier.bat file copies the C:\Programs directory to D:\Backup

and the C:\Programs directory with all its subdirectories will be copied to D:\Backup.

You can use more than nine command line options if needed. This is achieved by using the SHIFT command, which changes the values ​​of the replaced parameters from %0 to %9, copying each parameter to the previous one, that is, the value of %1 is copied to %0, the value of %2 is copied to %1, etc. The replaced parameter %9 is assigned the value of the parameter following the old value %9 on the command line. If such a parameter is not specified, then the new value %9 is an empty string.

Let's look at an example. Let the batch file my.bat be called from the command line as follows:

My.bat p1 p2 p3

Then %0=my.bat, %1=p1, %2=p2, %3=p3, parameters %4 – %9 are empty strings. After executing the SHIFT command, the values ​​of the replaced parameters will change as follows: %0=p1, %1=p2, %2=p3, parameters %3 - %9 - empty lines.

When extended command processing is enabled, SHIFT supports the /n switch, which specifies the start of parameter shifting at number n, where n can be a number from 0 to 9.
For example, in the following command:

SHIFT /2

parameter %2 is replaced by %3, %3 by %4, etc., while parameters %0 and %1 remain unchanged.

The reverse SHIFT command is missing. After executing SHIFT, it is no longer possible to restore the parameter (%0) that was the first before the shift. If more than ten parameters are specified on the command line, the SHIFT command can be used several times.
Batch files have some ability to parse replaceable parameters. For parameter number n (%n), the syntactic constructions (operators) presented in the following table are allowed:

Table 2.1. Operators for replaced parameters

Operators

Description

Variable %n expands to full filename

From the %n variable, only the drive name is extracted

From the %n variable, only the file path is allocated

From the %n variable, only the file name is extracted

The file name extension is extracted from the %n variable

The meaning of the N and X operators for the %n variable is changed so that they operate on the short file name

The directories specified in the PATH environment variable are searched and the %n variable is replaced with the full name of the first file found. If the PATH variable is not defined or no files are found as a result of the search, this construct is replaced with an empty string. Naturally, here the PATH variable can be replaced with any other valid value

These syntactic structures can be combined with each other, for example:

%~DPn - the drive name and path are extracted from the %n variable,
%~NXn - the file name and extension are extracted from the %n variable.

Consider the following example. Let us be in the C:\TEXT directory and run the batch file with the Story.doc parameter (%1=Story.doc). Then applying the operators described in the table above to parameter %1 will give the following results:

%~F1=C:\TEXT\Story.doc %~D1=C: %~P1=\TEXT\ %~N1=Story %~X1=.doc %DP1=C:\TEXT\ %NX1=Story.doc

"1. The environment is
mechanism for transferring data from parent process to child process +"

"2. A filter in UNIX systems is called
a program that, without I/O redirection, reads from the keyboard and writes to the terminal+

"3. The term "program standard error output" means
data stream where diagnostic messages are output by default+
"
"6. Completion of construction is
substitution of the full object name by part of this name+
"
"5. What is not typical for the command interpreter?
converting a regular expression into its corresponding substring+

"7. How many X servers can be registered on one computer?
any quantity+

"8. In the X11 graphical environment:
Every X client needs an X server, the identifier of which must be set using a parameter or environment variable+

"9. XFree86 is
proper name of the graphics subsystem oriented to the IBM PC + architecture"

"What is the instrumental area of ​​human activity?
area of ​​creating a universal approach to solving a class of problems +"

"14. What is the reason for separating the applied and instrumental areas when solving a problem?
the design of a tool that solves a problem may have nothing to do with either the problem itself or its solution+
in order to use a tool for solving a problem, you don’t need to know how it works+
the same technology can be used to create solutions to problems in a variety of areas, often non-overlapping +"

"15. What areas does an experienced user of a procedural system need to know?
applied+
"

"17. What is not supported in the vim editor?
sound commands +"

"20. The /var directory on a typical UNIX system is used to store
files, the size and number of which are unknown in advance +

"21. What is in the /etc/rc3.d directory on a Linux system?
symbolic links to start scripts of system services +"

"23. Documentation in the form of info pages
a strictly structured hypertext that can be obtained from other documentation presentation formats+

"25. The principle of guaranteed skills requires that
having the most general skills in working with the machine, the user could already solve his problems +

"26. An order in a procedural system is
description of the use of the system in the language of the application area+

"27. Select the item containing only the principles of organizing procedural systems
personal responsibility and guaranteed skills +"

"28. The nominal subject is
the basis on which the system makes a decision to grant access to an object+

"29. Vertical information flows deal with
objects of varying degrees of significance+

30. The subject-subject access rights model is used to
restrictions on the access rights of one specific subject to one specific object+

"31. Stages of the three-level loading procedure:
boot, select boot program, select system kernel+
"
"32. What can't be done in the FreeBSD boot scheme?
bootloader from a partition declared not in the MBR, but in an extended partition+
"

"34. (choose the wrong answer) A basic regular expression includes the concept
group number+

"35. Extended regular expression includes the concept
selection operation+

"36. Which of the lines ""abcdf"" ""abcdbcdf"" ""abcdef"" ""af"" ""adbdf"" ""acf"" corresponds to the RF "af"
acf+

"37. What is the "control input problem" in text editors?
control commands are more numerous and varied than control keys, but to call a control command it is advisable to perform a minimum of actions +

"38. The ex utility is
line-by-line text editor, similar to the vi editor, always running in command line mode +"

"40. An active process differs from a background process in that
only the active process has the ability to enter data from the terminal +"

"41. PID (process identifier) ​​is
a unique number assigned to each process+

"42. How to stop a frozen program?
find out its PID and send a "KILL" signal using the kill+ program
"
"43. Resource sharing is
restriction of the method of access to resources (access policy) and the very ability to use the resource (access rights)+
"

"45. The functions of the operating environment include
unification, separation and accounting of system resources+

"46. How many _ways_ of access are there in a UNIX file system?
three: write, read and use+

"48. The nominal subject in UNIX is uniquely determined
UID+

"49. The creators of UNIX systems expected
for an educated user interested in the development of the system+
"
"0. Daemons in a typical UNIX system
correspond to the concept of system content of the operating environment+
"
"51. UNIX system interface
based on text data transmission+

"2. Substitution in shell is
temporary or permanent launch of another program instead of the command interpreter+

"4. Basic commands for working with files:
ls, rm, mv, cp+

"6. If the current directory contains at least a file named ""a"", then with the command ls a* the ls utility will get

a list of all files in the current directory whose name begins with "a"+ "

"7. The number 11 in the name X11 is
graphics protocol version number+
"
"8. Which approach to OS development corresponds to the desktop metaphor?
procedural, as it contains a legend+
"
"9. In the X11 graphical environment:
The X client issues graphical I/O requests, and the X server executes them, as well as interacting with the user by polling input devices+
"
"10. A project in a projective system is
a set of data that completely defines the properties of the system created on their basis+

"11. Indicate an area of ​​application that is not typical for projective systems
payment at the supermarket+

"12. A project in a projective system is a set of data that uniquely describes
all the properties of the future system required by the user +

"13. Who is the user of the procedural system?
Client+

"14. What is a man-machine system?
a system in which the solution to a problem occurs as a result of interaction between man and machine+

"15. Name the instrumental and applied areas when solving the following problem: creating a railway schedule
transportation and safety – instrumental area; mathematical statistics and mathematical logic - applied+
"
"16. Text marks
used in commands to move to a text location predefined by the user+

18. Is it possible to implement the function of moving through hypertext links in HTML format?
yes, but this will most likely require the use of external programs to analyze the edited data and create additional working files+

"19. Standard UNIX directories are subdivided
according to the way the stored files are used by the system and the user +"

"20. In the directories rc1.d, rc2.d, etc. there are
symbolic links to startup scripts, of two different types+

"21. The /etc directory on a typical UNIX system is used to store
configuration files and system startup scripts+

"22. Purpose of the NAME field:
a short description of the object that serves as an index in the whatis+ database


NAME and DESCRIPTION+

"24. Select the item that mentions only the main sources of information about the system
manuals and /usr/share/doc+

"25. (choose the wrong answer) Following the principles of organizing procedural systems helps
independent formulation and solution of problems+

"6. The dialogue between man and machine in a procedural system is most often built on the basis
activity of the machine offering solution options+

"28. Delayed data transfer is possible
only in a system with access sessions+

"32. An extended partition is
any, except the first, usable part of the disk, starting with the disk partition table+

"36. Which of the lines ""abcdf"" ""abcdbcdf"" ""abcdef"" ""af"" ""adbdf"" ""acf"" corresponds to the RF "a(bcd)*f"
abcdf abcdbcdf af+

"37. The abbreviation of commands in vi leads to the fact that
the sequence of editing commands can be read by their full names +"

"38. The vi editor has three modes for working with text:
command line, command and insert mode+
"
"39. Pressing the "c" key in vi command mode will cause
waiting for a move command, after which the corresponding part of the line will be deleted and the transition to insert mode+ will occur

"40. The terminal line is
a byte serial device in /dev capable of converting input and output streams and transmitting signals+

"42. The signal is
a file system-independent way for processes to interact +"

"43. What is the difference between an operating system and an operating environment?
operating system is a consideration of a human-machine system from the point of view of its developer, and the operating environment is from the point of view of the user +

"44. What is the difference between counting and exchange problems?
While the exchange task is waiting for the end of the I/O operation, the counting task can be executed even if it is queued for execution later +"

"45. What is the meaning of distinguishing between system and user content of the OS?
system content is associated with instrumental ones, and +"

"46. What is fully implemented in UNIX?
trusted subject +"

"47. What is the "t-bit" of the directory for?
so that the user does not have the right to delete other people's files from this directory +

"49. The most difficult thing to observe in a UNIX system is

the principle of intelligibility of the context, since the capabilities of the system are constantly expanding+
"
"50. Most user interface functions on Unix systems are taken over by
command interpreter and file system+

"51. Concepts of "system utility" and "user utility" in UNIX

intersect due to the mixing of instrumental and applied areas +
"
"3. The term "standard program input" means

the data stream where the default reading comes from+

4. The command line interface appeared due to

the need to combine project development, solution launch and results analysis in a single interface+
"
"5. When editing the command line and history, the main thing is

minimizing actions on basic functions - search, deletion, addition, etc.+

"9. X11R6 is

name and version number of the graphics transfer protocol+
"
"10. Without observing what principle is a full-fledged projective system impossible?

the principles are interconnected, so violation of any harms the others, and therefore the system +"
"11. When mastering the projective system, the user will have to


"
"11. The principle of information openness requires that

there was enough information in the system to fully master it+

"15. Name the tool and application area when solving the following problem: designing a wheelchair body

automotive industry and medicine - applied field; Strength materials and chemistry of metals – instrumental+
"
"16. If possible, the vim editor
far superior to vi+ editor

"19. What does the mount command do?
makes the specified filesystem available as a subdirectory in the directory tree+

"24. Select an item that only mentions the most important fields in the manual

DESCRIPTION and SEE ALSO+"

"26. A procedure in a procedural system is

user action leading to changes in object properties +"
"27. Select the item containing only the principles of organizing procedural systems

overlapping procedures and guaranteed skills+
"
"28. Information flow in the secrecy model is

changing the object's significance level+
,
"30. Trusted entity

may violate system security policy+
"
"31. The three-level scheme allows

protect the boot process from hacking by an attacker who has gained access to the system console"

BootROM, BootBlock, BootProg+
"
"33. How many standard partitions can fit in one disk partition table (HDPT) of an IBM-compatible computer?

34. The reason for the frequent use of regular expressions in UNIX

Most UNIX projects are structured text that can be parsed well using a regular expression+

"36. The context address specifies

range of lines to which the corresponding command is applied+

terminal equipment that terminates a stream of input or output data+

"46. Is it possible to delete someone else's file from your directory?

Yes. Deleting is an operation on a directory, not a file+

"49. UNIX is
name of the class of projective human-machine computer systems+

"
"50. Packages in a typical UNIX system

"1. Operation ""|"" in shell

separates two commands: the output of the first is redirected to the input of the second+

"8. What is the difference between the terms ""X-terminal"" and ""xterm""
X terminal is a computer and xterm is a program+
"

"10. The projective system is based on the requirement
understanding the processes occurring in it+
"

"12. The inverse problem of a projective system is

modification of the system design based on analysis of product shortcomings+
"
"13. What is the applied field of human activity

area of ​​problem formulation and solution+
"

"15. Name the instrumental and applied areas when solving the following problem: creating an online casino

mathematical statistics and financial activity - applied field; web design and psychology – instrumental+
"
"16. Vi editor settings can be changed

two ways without restrictions +"
"7. What is not supported in the vim editor?
navigation through hypertext links in HTML format (without using external links)+
"
"18. Is it possible to implement a spreadsheet editing function?

yes, but this will most likely require the use of external programs to convert the edited data+"
"19. Execution levels are

operating profiles of USG family systems, differing in the list of functions performed+
"
"20. The main disadvantage of the "linear" bootstrap scheme (the so-called old BSD scheme, FreeBSD4)

to change the order in which services are loaded, you need to edit the start script, introducing syntax errors into which can cause the system to malfunction + "
"21. The /usr directory on a typical UNIX system is used to store

most of the files necessary for normal operation of the system+"
"22. Purpose of the SYNOPSIS field:
quick help on using the object+

"
"23. All manual pages

divided into seven to nine sections+
"
"24. Select the item that mentions only the main sources of information about the system
manuals and info pages+"

"26. A legend in a procedural system is
description of the system device in the language of the application area+
"
"26. An order in a procedural system is

description of the use of the system in the language of the application area+
"
"28. Subject-object model based on ACL

assigns each object an arbitrary list of subjects and their access rights+
"

"32. Select an item whose sub-items correspond to three successive levels of pre-system boot

device selection, bootloader selection and configuration, kernel selection and configuration +"
"33. How many standard primary partitions can be created on the disk of an IBM-compatible computer?

four, if no additional sections are provided, otherwise - three +"

"35. The same regular expression can be used in all utilities that work with RT

only basic, pre-adapted according to style+
"

"37. Screen editor vi

exists on any UNIX system, but if the terminal is unsuccessfully configured, it can only be used in line-by-line mode+
"
"38. A nest command in vi can consist of

multiplier, action and text movement+

a filesystem object containing a string that is interpreted as a file path+
"
"42. (choose the wrong answer) How to stop the program ""cat"" running without parameters?

send her the end-of-file character (usually ""^Z"")+

unification, separation and accounting of system resources+
"
"45. What is a "task context"?

information necessary to manipulate the task when organizing pseudo-parallelism+
"
"45. What is "virtual memory"?
a way to share address space between tasks+

"49. UNIX sockets

a consequence of the constant development of the system by various organizations+
"

"51. Tasks in the UNIX process queue

are executed in an order that takes into account the place in the queue, but in such a way as to reduce system downtime +"
"3. The term "standard program output" means

data stream where recording occurs by default+
"
"4. In the line typed in response to the shell prompt, the first word is most often
utility +"

"8. In the X11 graphical environment:

X server is a program that requires graphical input/output devices +"

"11. The principle of intelligibility of context requires that

to solve the problem assigned to the system, it would not be necessary to study the operation of most parts of the system+

"19. On UNIX systems

Several types of file systems are used+
"
"20. What process is associated with each terminal immediately upon completion of loading?

getty+ program

"25. The procedural system is based on the requirement

reduction or exclusion from the dialogue between man and machine of concepts not included in the application area +"
"26. The principle of overlapping procedures requires that

any problem could be solved using one existing procedure or the sequential application of several+

"29. The reliability model introduces a ban

for operations leading to moving an object to a higher level +"

"37. The main area of ​​application of a text editor in UNIX
creation of informational and educational texts
development and modification of programs and configuration files+
development and transformation of system services
development and display of the appearance of printed documentation"
"38. Most in vi

text navigation commands+
"

"42. The term "terminal" can mean

a hole file that interprets text data transmitted through it in a special way+++
"
"43. For the traditional virtual memory mechanism, the following statement is true:

any task has a contiguous address space that is not available to another task+

"46. Who runs the "chown" command most often?
Superuser+
"

"49. UNIX system interface

is based on the transfer of text data, so it does not require graphical input/output devices at all+

"
"50. The function of the resource manager in UNIX is performed by

kernel - for resources needed by the system itself, daemons and system programs - for user resources +
"
"1. In what case will the if statement in the shell consider the condition to be satisfied?

if after executing the list of commands placed in the "condition" field, the return code is not equal to 0 +"
"1. The shell profile is

script executed at login+

"5. In typical use of the template
the command interpreter substitutes a list of files matching the pattern into the command+

"
"7. Moving, changing the size and appearance of windows in X is handled by

The X server is responsible for the size and position of the window, executing commands from the window guide, which in addition draws frames and decorators."
"7. The peculiarity of graphic resources is that they

may only be needed by users with access to graphics I/O+ devices

"11. When mastering the projective system, the user will have to

implement several solutions to already solved simple problems+
"
"12. Select the item containing only the principles of organizing projective systems

information openness and personal responsibility +"
"13. What areas does an experienced user of a projective system need to know?
applied and instrumental+

"
"14. The user of what type of system most often acts as an intermediary between the machine and the customer?

Projective+
"
"15. What type of human-machine systems requires the user to have knowledge of the instrumental domain?

Projective+
"
"16. How many pockets does the vi editor have?

one unnamed and several named+
"
"17. Does it make sense to store complex vi commands as text comments?

yes, vi has a command to execute the contents of a pocket as a list of commands +"

"23. Select an item that only mentions the most important fields in the manual
NAME and SEE ALSO+

"25. The principle of limited knowledge requires that
solving a user problem did not require studying the system itself+

varies for different computer architectures+
"
"32. Select an item whose sub-items correspond to three successive levels of pre-system boot
universal program level, multifunctional program level; level focused on a specific kernel and module format
hardware level; universal software level; multifunctional software level focused on a specific kernel and module format+
BIOS level, kernel level, kernel bootstrapping level
hardware level, BIOS level, universal software level"

"34. The left-long rule says that
from all the corresponding RT substrings, the one that begins earlier is selected, and if there are several of them, the longest among them +
"
"36. Which of the lines corresponds to the RF "m(1.3|)+"
m123x m1x3x1x3 m1-3yy1+3 m113113113 myxxz+
"
"37. (choose the wrong answer) The ed utility is

interactive text editor with a small number of powerful editing commands+

"
"39. The ed utility is
line-by-line text editor that works with any type of terminal+

"44. The functions of the operating environment include
unification, division and accounting of tasks+

"45. What is "pseudo-parallelism"?
technology for simultaneous execution of several tasks regardless of the number of computer processors+

"46. Why can ""login"" launch a shell ""on behalf of"" any user?
the program ""login"" is launched with superuser rights+
"
"23. Documentation on the UNIX system
should be formatted according to the specifics: general information and context - in the form of man, complex manuals - in the form of info or html, books and textbooks - in special formats +

"32. The starting virtual disk (initrd) is
a mechanism for placing a file system in memory for loading and linking kernel modules during pre-boot+"

"42. (choose the wrong answer) How can I temporarily pause the output of a program that is too long (for example, ""ls -r /"")?
redirect remaining output to a file (usually "">file"")+