Organization of the file system
higher ties, amended earlier. Otherwise, the kernel is in a parent-free
directory listing for a file with a new name, writes in her new name and number
of the original file index. Deleting file In Unix unlink systemic function
removes from the catalog entry point for the file. Syntax unlink function call:
unlink (pathname); If you want to delete the name of the file is the last
respect to any folder, the kernel eventually relieve all information blocks file.
However, if the file were a few ties, it is still available under other names.
To pick up the disc blocks in the kernel cycle viewing table of contents index
node, releasing all the units directly addressed immediately. Regarding indirect
addressing blocks, the nucleus relieve all the units that appear at various
levels kosvennosti, recursively, in the first instance are exempt units with
less. Systemic challenges of working with filesystem descriptor
Clear file can be used to read and write sequences of bytes. To support this
call, two systems read and write, working with filesystem descriptor (or handle
the billing in Microsoft terminology), received in previous systemic or open
challenge to creat. From the file I / O functions System performs read reading
challenge conventional file number = read (fd, buffer, count); where fd-file
descriptor returned by the function open, buffer-address data structures in the
user process, which will host a matter of data in the event of a successful
conclusion of the function read, count-the number of bytes that the user needs
to be read, the actual number-byte read. Syntax call system function write (write):
number = write (fd, buffer, count); where variables fd, buffer, count and the
number has the same meaning as for the system call functions read. Algorithm
record in the file is like a normal reading of the conventional algorithm file.
However, if there is no block in the file that corresponds to the offset in
bytes to the place where the record must be carried out, the kernel allocates
block, and assigns it a number according to the exact place in the table of
contents index node.