File operations
two ways of file operations File System OS to provide users
with a set of files in the form of a set of system calls This
usually consists of system calls such as creat (a file), read (read from a file),
write (write files), and several others. Most of the same file
is a user performs an operation, and the sequence of operations. For example,
when a text editor,file, which contains some paper, the user
typically reads a few pages of text, editing the data and write it on a few,
then reads the pages from another file, etc. After a large
number of read / write user completes work with the file and
passed to the next. Whatever the operation is not performed on a file,
for there are some universal to all operations : character of the file
name to find its characteristics, which are stored in the file system on
the disk. Copy characteristics of thefile into memory, which
was the only way the program code can be used. The characteristics of the file
to verify the user to perform the requested operation (reading, writing,
deleting, viewing file attributes). Clear the area of memory
reserved for temporary storage of files . In addition, each
transaction has a number of unique for its action, such as reading a set of
clusters disk file removal, etc. The operating system can
perform the steps of the file in two ways (Figure 7.26) : For
each operation performed as universal, and unique action. Such a scheme is
sometimes called the scheme without memory of operations (stateless). All of
universal performed at the beginning and end of sequence, and for each sub-operations
are performed only unique action. The vast majority of file systems
supported the second type of file operations to be more
efficient and fast. The first method has one advantage-it is more resistant to
breakdown in the system, because each operation is self-sufficient and not
depend on the outcome of the previous one. The first method is sometimes used in
distributed network file system (for example, Network File
System, Sun NFS), which disrupted due to loss or failure of a package of network
nodes are more likely than local access to files. Fig. 7.26. Two ways to execute file
operations in the second mode in the file system
introduces two special system calls : open-opening the file
and close-closing the file . System call open it before you
open any file with the sequence of operations, and closing a file
close call, after working with the file . The main
task is to transform call open character of the file name in
its unique numeric name, copying the file from the disk
performance on the screen of RAM and testing user to perform the operation.
Getting close to releasing the buffer characteristics file, and
makes it impossible to continue operations with the file
without it reopened. Of the opening and closing a file in one
form or another entrenched operating systems for a long time. Even in the "old"
operating system, such as OS/360, there OPEN macros, which in a special buffer,
called the DCB (Data Control Block), collected from various sources all desired
characteristics of the data set (a concept similar to the modern concept of a file),
then used in the performance of reading and writing. The main file
system calls examined in more detail by the implementation of a UNIX
operating system, in which they became the kind we have now virtually all
operating systems. Opening file System open challenge to a
UNIX operating system with two arguments : the character name and a file
is opened by opening a file . The opening of said system, which
operations will be carried out over a file in the sequence of
operations before the closure of the file systems close call,
for example : read-only, only recording or reading and writing. When you open
the file first OS is the first transformation of the system
call arguments, the character of the file name , in his unique
numeric name, which in the traditional UNIX file systems is the
descriptor index number. This procedure has been discussed above in the
description of the file system s5. The descriptor index number
inode file system is an entry on the disk and copies of its
features file into RAM. To keep copies of the data buffer
descriptors used on the system of virtual space. Specifications descriptor index
transferred to the cache, placed in the structure of the so-called virtual vnode
pointer (virtual node). The vnode includes fields index the file
inode, and several of the following additional fields useful in carrying out
operations with the file . The index pointer in memory,
reflecting : - Has locked file ; - waiting to unlock a file
with the process; - is whether the characteristics of the file
in memory of its disk copies of the contents of the index file ;
- is whether the file in the memory of its disk copy of the file;
- if it's empty. Logical number of the device file system
containing the file. Number index descriptor. The disk index descriptor this
field because the number is determined by the situation on the start of the
descriptor index descriptors. The reference to the vnode structure. In the same file
in a period of time can work processes, but the operating system does
not create a separate process for each copy vnode structure, and for each file
, which is currently operating at least one process, store exactly one
copy of the virtual pointer. When the file is opened the OS
checks whether the system memory vnode structure opened file (dial
logical devices and the descriptor index number, which are determined to
transform the character name), and, if available, reference to the meter will
increase by one. When the closure of the file reference count
decreases by one, and if it is equal to 0, the buffer that contains this vnode
is free. Using single copy of the characteristics file, and
some of the characteristics of the file (for example, locking
feature), common to all working with your processes to save computer memory.
Nevertheless, the characteristics of each individual process, performing a
sequence of the same file . The storage structure is used in
the UNIX file type, which, like the vnode is stored in the
system memory. When you open a file of OS checks the user
process to perform the operation with the file and, if the
tests are successful, in the system creates a new memory structure file,
which describes how the open file , and operations that process
is going to file (such as reading). The file
contains fields such as : a sign of the opening (read only, read / write, etc.);
vnode pointer to the structure; Current position in the file (variable
offset) in the operation of reading / writing; Count references to the
structure; pointer to the structure, with the right process, which opened the file
(this structure is in the process descriptor); pointers to the
previous and subsequent file structure, linking all such
structures in the double list. Partly offset stored in the file ,
allows OS remember a directory of the current situation in order byte file
. When you open a file , the variable contains the
start or end byte file , depending on how the regime opening.
Once read or write pointer shifted to the number of bytes, which was read or
written from an operation. The next pointer caught in the same condition in
which it left the previous operation. Application programmer can manage the
situation clearly pointer with System Call 1 seek to be considered below. When
the opening of a file for a new structure file
and places it in the linked list twice (Figure 7.27). Generally a storage
structure file in the system has a limited area, so the total
number of all open files at any time is limited. Once the file
structure of the operating system puts a pointer to a table of open files
, which is in the process. If the process several times opens the same file
, the file structure is created for each opening.
Because in the context protsessa-roditelya UNIX inherited protsessom-potomkom,
the offspring will inherit and indexes all the file you open
and are able to perform operations on them. System call open in a custom process
returns a file descriptor , which is a record number in the
table of open files. Handle file is locally
significant only for the process that opened the file to the
different processes the same meaning pointer points to the different operations
in the event of different file . After opening its file
descriptor is used in all subsequent transactions with the file
up to the apparent closure of the file . Thus, the file is a temporary
file a unique name, but did not file , a sequence of
this file . To open the file / bin / prog 1.ehe in "read-only"
application programmer can use the following phrase in the language C : fd =
open ( "/ bin / progl exe". 0_RDONLY) : Here fd - is an integer variable that
holds the importance of open file descriptors . Its importance
should be used in data from the file / bin / progI.exe. In an
unsuccessful attempt to open it (no rights for the requested operation, the
wrong file name ) to fd assigned a value of -1, which is an
indicator of error for all UNIX system calls. Fig. 7.27. Relationship of open files,
* Data from the file to exchange data with pre-open file
in a UNIX operating system there are system calls read and write. When should
clearly specify which byte file to be read or write the data,
the system also call T seek. Systemic challenge of reading data from the file
is read three parameters : read (fd buffer nbytes) : First fd argument is the
integer variable relevant open file descriptor . The second
argument is a pointer to the buffer area of user memory, in which the system
must place a few figures. Number of bytes of memory that is set to an integer
argument nbytes. The read returns released few bytes (it may be different on a
given if, for example, has raised the area of reading, above the file)
or error code -1. Beginning on disc to be read by calling read, clearly this
does not indicate a systemic challenge. Reading starts at the byte, which
indicates a shift in the structure offset file . This shift
indicates a record number fd table of open files . After the
call, read shift offset by the number grew read bytes. View Systems call
recording write similar summons read : wnte (fd buffer.nbytes). The write writes
nbytes from the buffer RAM buffer to a file descriptor fd out.
The write as well as read, returns the underlying value of a real program of
bytes transferred or error code. Consider an example in which the application is
a file consisting of fixed-length records of 50 bytes : fd =
open ( "/ doc/qwery/base12. Txt "0_RDWR). read (fd bufferl, 50) : read (fd.buffer2,
2500) : Iseek (fd, 150, 0) : write (fd, output, 300) : close (fd); In the
fragment of the opening of the file / doc/query/base12.txt for
reading and writing is the first reading records file , and
then read the file area , which includes 50 entries, ranging
from 2 to 51. After a few records (these instructions withheld) made to move the
pointer offset in the file at the beginning of the fourth record and record
results in six consecutive records, starting with the fourth. A piece of the
closing file with the System Call close. All the system calls are synchronous,
that is a custom process placed in the waiting until the I / O operation is
completed. Described a set of system calls, appeared in a UNIX operating system
in the 1970s, has become the de facto standard for modern operating systems. The
traditional system calls often in specific OS complemented by original system I
/ O calls, such as asynchronous operation type. Based on the I / O system calls
are usually more powerful I / O library functions that make up the application
interface OS. Blocking file lock files and
records in the files as a means of synchronization between
working in cooperation processes, trying to use the same file
simultaneously. Processes may be appropriate file access , but
use of the law (in particular the ability to write) can lead to incorrect
conclusions. An example of this is the simultaneous editing of the same document
multiple users. If the file is run blocking, every user who
has the right to write the file , works with a copy of the file.
The result of this editing is unpredictable, it depends on the sequence in which
you write the changes to a file of user prilozheniya-redaktory.
Hardware operating systems generally supported a special challenge to the system,
which allows a programmer to install and test lock on the file
and individual field. In a UNIX system call is fcntl. In his arguments indicated
an open file , which you can determine or verify the locking
type (freezing or by blocking access to reading or writing), as well as field-blocking
position from the beginning of the file and size in bytes. When
checking for locks set by other processes challenge fcntl returns reported by
management. When you can lock two modes of system calls : the transition process
in the state of expectations if the block could not be ascertained (synchronous
system call), and the immediate return to a situation with a negative message (asynchronous
call). The requested records lock can be installed if another process is already
set its blocking list for the same file . So blocking record is
exceptional. Blocking reading is not exclusive and can be installed on a file
if the area is not cut off. If any region of the file
is read lock, then this area can not be blocked account. In UNIX, there are two
modes of lock-advisory (advisory) and mandatory (mandatory). The recommended
treatment is to use a consultative. In its operating system is not blocking
transactions with the file, and only the signs blocking of file
structures that support file operations .
Kooperiruyuschiesya processes must check locks on the file to
synchronize their work. If the lock set, but the process will not check them,
the operating system does not prohibit access to the file ,
process, the process makes the system calls read or write. In a mandatory ban on
transactions with lockable file supported operating system,
therefore, in any case, does not have access to this file .
However, the work in this mode operating system spends a lot of time and effort
to maintain it, so it is usually not recommended. -- Standard input and output files
, then concludes in a UNIX operating system were introduced at the time
such thing as a "standard" file input, the output file
"standard " and "standard" file errors . The three had opened a file
by any user process since its inception. The process at any time may organize
input from the standard input file , execute the following
systemic challenge : read (stdio. buffer. Nbytes). The stdio-fated name of the
constant showing pointer standard input file . Similarly, as
stdout-fated name tag standard file output can put data in a
standard output file using the following systemic challenge :
write (stout, buffer, nbytes) : The standard file contained
errors name stderr. In fact, in creating the new OS places in the table open files
three entries : number 0-for standard input file (hence,
stdin is always set to 0), with a number 1 for the standard file output
(stdout = l), and No. 2 for the standard file (stderr = 2).
The three structures are established and the type of file , at
which point the first three entries of the table open files .
In the early days of the process of these three file structure
associated operating system with a single file . As the file
is a special file -terminal from which the logged in user. Such
an appointment standard file a natural. Applications launched
user in the session, often showing results and error messages on the terminal
screen, which is user at the keyboard and the same terminal read commands, and
other basic data. Model standard file I / O is mainly
alphanumeric terminals managed by well-described stream of withdrawing bytes,
which appears in the form of lines of characters on the screen, and the flow of
input bytes generated consistent pressing keys. The best known program, the
widespread use of standard I / O file , a command interpreter,
also called the envelope (shell) operating system. Intermediate to read user
input commands (from the standard input file ) and perform their
own or with their internal functions (such as internal commands), or interpreted
as a command name of the executable file on disk, which should
start to perform as a separate process (external commands). Communications
interpreter display terminal-standard file output. Standard
input and the input file are widely used not only command
interpreter, but also by the team. Many internal and external teams up such that
they can read their raw data from the standard input file , or
display the results in a standard output file . If the team
makes it both ways, it's called filter. Consider a few examples of UNIX commands,
working with standard input and output file : ls - dir2 reads
directory entries dir2 and puts them in a symbolic form to the standard output
file ; wc-filter, which reads a sequence of bytes from the
standard input file , counts the number of words lines or
characters in a matter of data and displays the result in the output file
standard; - who puts in a standard file information on users
working in the system. Intermediate teams is also an important function as a
standard redirect input and output. This means replacing fayla-terminala default
as the standard input and output file to arbitrary file .
The referral mechanism based on the fact that the application does not know what
the file is standard, but simply uses a pointer to a pointer to
the file . Therefore, I / O redirection is a team with the
implementation of non-standard entries in the connection table open file .
The transfer is effected by means of special designs command language. For
guidance on the appropriate interpreter to redirect standard input file
used to construct the following : file to redirect standard
output requires the following design :> file , for example, the
command shown below writes data on the contents of a file
directory dir2 a.txt : Is dir2> a.txt The I / O redirection, put UNIX OS, widely
distributed in the interface commands many operating systems, such as MS-DOS,
Windows, OS / 2. program code can be used. The characteristics of the file
to verify the user to perform the requested operation (reading,
writing, deleting, viewing file attributes). Clear the area of
memory reserved for temporary storage of file. In addition, each
transaction has a number of unique for its action, such as reading a set of
clusters disk file removal, etc. The operating system can
perform the steps of the file in two ways (Figure 7.26) : For
each operation performed as universal, and unique action. Such a scheme is
sometimes called the scheme without memory of operations (stateless). All of
universal performed at the beginning and end of sequence, and for each sub-operations
are performed only unique action. The vast majority of file
systems supported the second type of file operations to be more
efficient and fast. The first method has one advantage-it is more resistant to
breakdown in the system, because each operation is self-sufficient and not
depend on the outcome of the previous one. The first method is sometimes used in
distributed network file system (for example, Network file
System, Sun NFS), which disrupted due to loss or failure of a package
of network nodes are more likely than local access to file . Fig.
7.26. Two ways to execute file operations in the second mode in
the file system introduces two special system calls : open-opening
the file and close-closing the file . System
call open it before you open any file with the sequence of
operations, and closing a file close call, after working with
the file . The main task is to transform call open character of
the file name in its unique numeric name, copying the file
from the disk performance on the screen of RAM and testing user to
perform the operation. Getting close to releasing the buffer characteristics
file , and makes it impossible to continue operations with the
file without it reopened. Of the opening and closing a file
in one form or another entrenched operating systems for a long time.
Even in the "old" operating system, such as OS/360, there OPEN macros, which in
a special buffer, called the DCB (Data Control Block), collected from various
sources all desired characteristics of the data set (a concept similar to the
modern concept of a file ), then used in the performance of
reading and writing. The main file system calls examined in
more detail by the implementation of a UNIX operating system, in which they
became the kind we have now virtually all operating systems. Opening file
System open challenge to a UNIX operating system with two arguments : the
character name and a file is opened by opening a file .
The opening of said system, which operations will be carried out over a file
in the sequence of operations before the closure of the file
systems close call, for example : read-only, only recording or reading and
writing. When you open the file first OS is the first
transformation of the system call arguments, the character of the file
name, in his unique numeric name, which in the traditional UNIX file
systems is the descriptor index number. This procedure has been discussed above
in the description of the file system s5. The descriptor index
number inode file system is an entry on the disk and copies of
its features file into RAM. To keep copies of the data buffer
descriptors used on the system of virtual space. Specifications descriptor index
transferred to the cache, placed in the structure of the so-called virtual vnode
pointer (virtual node). The vnode includes fields index the file
inode, and several of the following additional fields useful in carrying out
operations with the file. The index pointer in memory,
reflecting : - Has locked file ; - waiting to unlock a file
with the process; - is whether the characteristics of the file
in memory of its disk copies of the contents of the index file ; -
is whether the file in the memory of its disk copy of the
file ; - if it's empty. Logical number of the device file
system containing the file. Number index descriptor. The disk
index descriptor this field because the number is determined by the situation on
the start of the descriptor index descriptors. The reference to the vnode
structure. In the same file in a period of time can work
processes, but the operating system does not create a separate process for each
copy vnode structure, and for each file, which is currently
operating at least one process, store exactly one copy of the virtual pointer.
When the file is opened the OS checks whether the system memory
vnode structure opened file (dial logical devices and the
descriptor index number, which are determined to transform the character name),
and, if available, reference to the meter will increase by one. When the closure
of the file reference count decreases by one, and if it is
equal to 0, the buffer that contains this vnode is free. Using single copy of
the characteristics file , and some of the characteristics of
the file (for example, locking feature), common to all working
with your processes to save computer memory. Nevertheless, the characteristics
of each individual process, performing a sequence of the same file .
The storage structure is used in the UNIX file type, which,
like the vnode is stored in the system memory. When you open a file
of OS checks the user process to perform the operation with the file
and, if the tests are successful, in the system creates a new memory structure
file , which describes how the open file , and
operations that process is going to file (such as reading). The
file contains fields such as : a sign of the opening (read only,
read / write, etc.); vnode pointer to the structure; Current position in the
file (variable offset) in the operation of reading / writing;
Count references to the structure; pointer to the structure, with the right
process, which opened the file (this structure is in the
process descriptor); pointers to the previous and subsequent file
structure, linking all such structures in the double list. Partly offset stored
in the file , allows OS remember a directory of the current
situation in order byte file. When you open a file ,
the variable contains the start or end byte file , depending on
how the regime opening. Once read or write pointer shifted to the number of
bytes, which was read or written from an operation. The next pointer caught in
the same condition in which it left the previous operation. Application
programmer can manage the situation clearly pointer with System Call 1 seek to
be considered below. When the opening of a file for a new
structure file and places it in the linked list twice (Figure
7.27). Generally a storage structure file in the system has a
limited area, so the total number of all open file at any time
is limited. Once the file structure of the operating system
puts a pointer to a table of open file , which is in the process.
If the process several times opens the same file , the file
structure is created for each opening. Because in the context
protsessa-roditelya UNIX inherited protsessom-potomkom, the offspring will
inherit and indexes all the file you open and are able to
perform operations on them. System call open in a custom process returns a
file descriptor, which is a record number in the table of open
file . Handle file is locally significant only
for the process that opened the file to the different processes
the same meaning pointer points to the different operations in the event of
different file . After opening its file
descriptor is used in all subsequent transactions with the file
up to the apparent closure of the file . Thus, the file
is a temporary file a unique name, but did not file ,
a sequence of this file . To open the file /
bin / prog 1.ehe in "read-only " application programmer can use the following
phrase in the language C : fd = open ( "/ bin / progl exe". 0_RDONLY) : Here fd -
is an integer variable that holds the importance of open file
descriptors. Its importance should be used in data from the file
/ bin / progI.exe. In an unsuccessful attempt to open it (no rights for the
requested operation, the wrong file name) to fd assigned a
value of -1, which is an indicator of error for all UNIX system calls. Fig.
7.27. Relationship of open file , * Data from the file
to exchange data with pre-open file in a UNIX operating system
there are system calls read and write. When should clearly specify which byte
file to be read or write the data, the system also call T seek.
Systemic challenge of reading data from the file is read three
parameters : read (fd buffer nbytes) : First fd argument is the integer variable
relevant open file descriptor. The second argument is a pointer
to the buffer area of user memory, in which the system must place a few figures.
Number of bytes of memory that is set to an integer argument nbytes. The read
returns released few bytes (it may be different on a given if, for example, has
raised the area of reading, above the file ) or error code -1.
Beginning on disc to be read by calling read, clearly this does not indicate a
systemic challenge. Reading starts at the byte, which indicates a shift in the
structure offset file . This shift indicates a record number fd
table of open file . After the call, read shift offset by the
number grew read bytes. View Systems call recording write similar summons read :
wnte (fd buffer.nbytes). The write writes nbytes from the buffer RAM buffer to a
file descriptor fd out. The write as well as read, returns the
underlying value of a real program of bytes transferred or error code. Consider
an example in which the application is a file consisting of
fixed-length records of 50 bytes : fd = open ( "/ doc/qwery/base12. Txt "0_RDWR).
read (fd bufferl, 50) : read (fd.buffer2, 2500) : Iseek (fd, 150, 0) : write (fd,
output, 300) : close (fd); In the fragment of the opening of the file
/ doc/query/base12.txt for reading and writing is the first reading records
file, and then read the file area, which
includes 50 entries, ranging from 2 to 51. After a few records (these
instructions withheld) made to move the pointer offset in the file
at the beginning of the fourth record and record results in six consecutive
records, starting with the fourth. A piece of the closing file
with the System Call close. All the system calls are synchronous, that is a
custom process placed in the waiting until the I / O operation is completed.
Described a set of system calls, appeared in a UNIX operating system in the 1970s,
has become the de facto standard for modern operating systems. The traditional
system calls often in specific OS complemented by original system I / O calls,
such as asynchronous operation type. Based on the I / O system calls are usually
more powerful I / O library functions that make up the application interface OS.
Blocking file lock file and records in the
file as a means of synchronization between working in
cooperation processes, trying to use the same file
simultaneously. Processes may be appropriate file access, but
use of the law (in particular the ability to write) can lead to incorrect
conclusions. An example of this is the simultaneous editing of the same document
multiple users. If the file is run blocking, every user who has
the right to write the file , works with a copy of the file
. The result of this editing is unpredictable, it depends on the
sequence in which you write the changes to a file of user
prilozheniya-redaktory. Hardware operating systems generally supported a special
challenge to the system, which allows a programmer to install and test lock on
the file and individual field. In a UNIX system call is fcntl.
In his arguments indicated an open file , which you can
determine or verify the locking type (freezing or by blocking access to reading
or writing), as well as field-blocking position from the beginning of the file
and size in bytes. When checking for locks set by other processes
challenge fcntl returns reported by management. When you can lock two modes of
system calls : the transition process in the state of expectations if the block
could not be ascertained (synchronous system call), and the immediate return to
a situation with a negative message (asynchronous call). The requested records
lock can be installed if another process is already set its blocking list for
the same file . So blocking record is exceptional. Blocking
reading is not exclusive and can be installed on a file if the
area is not cut off. If any region of the file is read lock,
then this area can not be blocked account. In UNIX, there are two modes of lock-advisory
(advisory) and mandatory (mandatory). The recommended treatment is to use a
consultative. In its operating system is not blocking transactions with the
file , and only the signs blocking of file
structures that support file operations. Kooperiruyuschiesya
processes must check locks on the file to synchronize their
work. If the lock set, but the process will not check them, the operating system
does not prohibit access to the file , process, the process
makes the system calls read or write. In a mandatory ban on transactions with
lockable file supported operating system, therefore, in any
case, does not have access to this file . However, the work in
this mode operating system spends a lot of time and effort to maintain it, so it
is usually not recommended. -- Standard input and output file ,
then concludes in a UNIX operating system were introduced at the time such thing
as a "standard" file input, the output file "standard
" and "standard" file errors. The three had opened a file
by any user process since its inception. The process at any time may
organize input from the standard input file , execute the
following systemic challenge : read (stdio. buffer. Nbytes). The stdio-fated
name of the constant showing pointer standard input file .
Similarly, as stdout-fated name tag standard file output can put
data in a standard output file using the following systemic
challenge : write (stout, buffer, nbytes) : The standard file
contained errors name stderr. In fact, in creating the new OS places in the
table open file three entries : number 0-for standard input
file (hence, stdin is always set to 0), with a number 1 for the
standard file output (stdout = l), and No. 2 for the standard
file (stderr = 2). The three structures are established and the
type of file , at which point the first three entries of the
table open file . In the early days of the process of these
three file structure associated operating system with a single
file . As the file is a special file -terminal
from which the logged in user. Such an appointment standard file
a natural. Applications launched user in the session, often showing results and
error messages on the terminal screen, which is user at the keyboard and the
same terminal read commands, and other basic data. Model standard file
I / O is mainly alphanumeric terminals managed by well-described stream of
withdrawing bytes, which appears in the form of lines of characters on the
screen, and the flow of input bytes generated consistent pressing keys. The best
known program, the widespread use of standard I / O file , a
command interpreter, also called the envelope (shell) operating system.
Intermediate to read user input commands (from the standard input file )
and perform their own or with their internal functions (such as internal
commands), or interpreted as a command name of the executable file
on disk, which should start to perform as a separate process (external commands).
Communications interpreter display terminal-standard file
output. Standard input and the input file are widely used not
only command interpreter, but also by the team. Many internal and external teams
up such that they can read their raw data from the standard input file ,
or display the results in a standard output file . If the team
makes it both ways, it's called filter. Consider a few examples of UNIX commands,
working with standard input and output file : ls - dir2 reads
directory entries dir2 and puts them in a symbolic form to the standard output
file ; wc-filter, which reads a sequence of bytes from the
standard input file , counts the number of words lines or
characters in a matter of data and displays the result in the output file
standard; - who puts in a standard file information on users
working in the system. Intermediate teams is also an important function as a
standard redirect input and output. This means replacing fayla-terminala default
as the standard input and output file to arbitrary file .
The referral mechanism based on the fact that the application does not know what
the file is standard, but simply uses a pointer to a pointer to
the file . Therefore, I / O redirection is a team with the
implementation of non-standard entries in the connection table open file .
The transfer is effected by means of special designs command language. For
guidance on the appropriate interpreter to redirect standard input file
used to construct the following : file to redirect standard
output requires the following design :> file , for example, the
command shown below writes data on the contents of a file
directory dir2 a.txt : Is dir2> a.txt The I / O redirection, put UNIX OS, widely
distributed in the interface commands many operating systems, such as MS-DOS,
Windows, OS / 2.
|